fixup! fixup! fixup! [IMP] use sqlparse also to determine which ddl to update

This commit is contained in:
Holger Brunn
2022-07-06 11:53:55 +02:00
parent 5046e6d000
commit fbe5bc5cb4
2 changed files with 7 additions and 0 deletions

View File

@@ -35,6 +35,12 @@ def schema_qualify(parsed_query, schema="public"):
# this is invalid sql
next_token = False
break
if next_token.is_keyword and next_token.normalized in (
'TEMP', 'TEMPORARY'
):
# don't qualify CREATE TEMP TABLE statements
is_qualified = True
break
if not (next_token.is_whitespace or next_token.is_keyword):
break
yield next_token