Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion ddl_deparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ get_altertable_subcmdinfo(PG_FUNCTION_ARGS)
strtype = "ADD OIDS (and recurse)";
break;
#endif
#if PG_VERSION_NUM >= 120000
#if PG_VERSION_NUM >= 120000 && PG_VERSION_NUM < 180000
case AT_CheckNotNull:
strtype = "CHECK NOT NULL";
break;
Expand Down Expand Up @@ -138,6 +138,11 @@ get_altertable_subcmdinfo(PG_FUNCTION_ARGS)
case AT_DropExpression:
strtype = "DROP EXPRESSION";
break;
#if PG_VERSION_NUM >= 180000
case AT_SetExpression:
strtype = "SET EXPRESSION";
break;
#endif
case AT_SetCompression:
strtype = "SET COMPRESSION";
break;
Expand Down
26 changes: 16 additions & 10 deletions pgl_ddl_deploy--2.2.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3048,14 +3048,17 @@ BEGIN
WHEN
--include_schema_regex usage:
(
(NOT $BUILD$||include_only_repset_tables||$BUILD$) AND
(
(schema_name !~* '^(pg_catalog|pg_toast)$'
((schema_name !~* '^(pg_catalog|pg_toast)$'
AND schema_name !~* c_include_schema_regex)
OR (object_type = 'schema'
AND object_identity !~* '^(pg_catalog|pg_toast)$'
AND object_identity !~* c_include_schema_regex)
)
AND object_identity !~* c_include_schema_regex))
-- do not account in autogenerated trigger constraints,
-- i.e. for foreign keys
-- Since PG 18 they have schema_name NOT NULL, so previous
-- checks fail and such triggers are accounted
AND NOT (
object_type = 'trigger' AND NOT original AND object_identity ~* '^"RI_ConstraintTrigger')
)
--include_only_repset_tables cannot be used with DROP because
--the objects no longer exist to be checked:
Expand Down Expand Up @@ -4205,14 +4208,17 @@ BEGIN
WHEN
--include_schema_regex usage:
(
(NOT $BUILD$||include_only_repset_tables||$BUILD$) AND
(
(schema_name !~* '^(pg_catalog|pg_toast)$'
((schema_name !~* '^(pg_catalog|pg_toast)$'
AND schema_name !~* c_include_schema_regex)
OR (object_type = 'schema'
AND object_identity !~* '^(pg_catalog|pg_toast)$'
AND object_identity !~* c_include_schema_regex)
)
AND object_identity !~* c_include_schema_regex))
-- do not account in autogenerated trigger constraints,
-- i.e. for foreign keys
-- Since PG 18 they have schema_name NOT NULL, so previous
-- checks fail and such triggers are accounted
AND NOT (
object_type = 'trigger' AND NOT original AND object_identity ~* '^"RI_ConstraintTrigger')
)
--include_only_repset_tables cannot be used with DROP because
--the objects no longer exist to be checked:
Expand Down