Fix external table/FDW metadata queries and update role-grant tests#106
Fix external table/FDW metadata queries and update role-grant tests#106chenjinbao1989 wants to merge 2 commits into
Conversation
…or PG16
backup/queries_externals.go: gp_exttable_fdw represents an unset
rejectlimittype as char(-1) ('\377'), not SQL NULL, so
GetExternalTableDefinitions was leaking that sentinel through instead of
coalescing it to ''.
backup/queries_functions.go: GetForeignDataWrappers and GetForeignServers
had no ORDER BY, so Postgres could return rows in a nondeterministic order.
integration/metadata_globals_*_test.go: PG16 reworked role-grant semantics
so an implicit grantor always resolves to the bootstrap superuser rather
than the acting (super)user, and an explicit GRANTED BY <role> now requires
that role to actually hold ADMIN OPTION. Updated fixtures accordingly, and
skipped "handles dropped granter" since PG16's grantor dependency tracking
means a role can no longer be dropped while still recorded as another
membership's grantor.
integration/postdata_create_test.go: updated a hardcoded view-definition
golden string to match PG16 ruleutils, which no longer qualifies column
references with the table name when only one table is in the FROM clause.
|
Hi @chenjinbao1989, can these changes be used for both PG14 and PG16 based Cloudberry versions, or only for PG16 based Cloudberry? I think we should add the main branch of Cloudberry to the CI pipeline to test these changes as well. cloudberry-backup/.github/workflows/cloudberry-backup-ci.yml Lines 54 to 60 in 509edb4 |
These changes are only for pg16 based codes. |
|
Please update the remaining PG16 ruleutils expectations in the end-to-end test:
CI is currently failing on this mismatch in |
backup/queries_externals.go: gp_exttable_fdw represents an unset rejectlimittype as char(-1) ('\377'), not SQL NULL, so GetExternalTableDefinitions was leaking that sentinel through instead of coalescing it to ''.
backup/queries_functions.go: GetForeignDataWrappers and GetForeignServers had no ORDER BY, so Postgres could return rows in a nondeterministic order.
integration/metadata_globals_*_test.go: PG16 reworked role-grant semantics so an implicit grantor always resolves to the bootstrap superuser rather than the acting (super)user, and an explicit GRANTED BY now requires that role to actually hold ADMIN OPTION. Updated fixtures accordingly, and skipped "handles dropped granter" since PG16's grantor dependency tracking means a role can no longer be dropped while still recorded as another membership's grantor.
integration/postdata_create_test.go: updated a hardcoded view-definition golden string to match PG16 ruleutils, which no longer qualifies column references with the table name when only one table is in the FROM clause.
closes: #ISSUE_Number
Change logs
Contributor's checklist
Here are some reminders before you submit your pull request: