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

This commit is contained in:
Holger Brunn
2022-07-13 00:38:22 +02:00
parent ba91374b7e
commit 49bcac937b

View File

@@ -39,7 +39,7 @@ def schema_qualify(tokens, temp_tables, keywords=None, schema="public"):
elif token.__class__ == Identifier and not token.is_wildcard(): elif token.__class__ == Identifier and not token.is_wildcard():
str_token = str(token) str_token = str(token)
needs_qualification = "." not in str_token needs_qualification = "." not in str_token
# qualify tokens that are direct children of a statement as in ALTER TABLE ... # qualify tokens that are direct children of a statement as in ALTER TABLE
if token.parent.__class__ == Statement: if token.parent.__class__ == Statement:
pass pass
# or of an expression parsed as function as in CREATE TABLE table # or of an expression parsed as function as in CREATE TABLE table