Revision 2440
Added by Aaron Marcuse-Kubitza over 12 years ago
sql.py | ||
---|---|---|
406 | 406 |
assert isinstance(into, sql_gen.Table) |
407 | 407 |
|
408 | 408 |
kw_args['recover'] = True |
409 |
|
|
410 |
temp = not db.debug # tables are created as permanent in debug mode |
|
411 |
# "temporary tables cannot specify a schema name", so remove schema |
|
412 |
if temp: into.schema = None |
|
413 |
|
|
409 | 414 |
while True: |
410 | 415 |
try: |
411 | 416 |
create_query = 'CREATE' |
412 |
if not db.debug: create_query += ' TEMP'
|
|
417 |
if temp: create_query += ' TEMP'
|
|
413 | 418 |
create_query += ' TABLE '+into.to_str(db)+' AS '+query |
414 | 419 |
|
415 | 420 |
return run_query(db, create_query, params, *args, **kw_args) |
Also available in: Unified diff
sql.py: run_query_into(): Fixed bug where "temporary tables cannot specify a schema name"