From 49bcac937bf36f1939edb0695db78bcc4ad8f9d5 Mon Sep 17 00:00:00 2001 From: Holger Brunn Date: Wed, 13 Jul 2022 00:38:22 +0200 Subject: [PATCH] fixup! fixup! fixup! [IMP] use sqlparse also to determine which ddl to update --- pglogical/hooks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pglogical/hooks.py b/pglogical/hooks.py index 33ae6fe7..df57178a 100644 --- a/pglogical/hooks.py +++ b/pglogical/hooks.py @@ -39,7 +39,7 @@ def schema_qualify(tokens, temp_tables, keywords=None, schema="public"): elif token.__class__ == Identifier and not token.is_wildcard(): str_token = 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: pass # or of an expression parsed as function as in CREATE TABLE table