aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeModifyTable.c
diff options
context:
space:
mode:
authorStephen Frost <sfrost@snowman.net>2017-09-13 20:02:09 -0400
committerStephen Frost <sfrost@snowman.net>2017-09-13 20:02:09 -0400
commitd2e40b310aea1050fd499f62f391329f2c331f6a (patch)
treed757eb52111799731a04809cea2f24ed1d97fd42 /src/backend/executor/nodeModifyTable.c
parent76e134fefd7de0554536e1b8d45a1878f96cf9c0 (diff)
downloadpostgresql-d2e40b310aea1050fd499f62f391329f2c331f6a.tar.gz
postgresql-d2e40b310aea1050fd499f62f391329f2c331f6a.zip
Fix ordering in pg_dump of GRANTs
The order in which GRANTs are output is important as GRANTs which have been GRANT'd by individuals via WITH GRANT OPTION GRANTs have to come after the GRANT which included the WITH GRANT OPTION. This happens naturally in the backend during normal operation as we only change existing ACLs in-place, only add new ACLs to the end, and when removing an ACL we remove any which depend on it also. Also, adjust the comments in acl.h to make this clear. Unfortunately, the updates to pg_dump to handle initial privileges involved pulling apart ACLs and then combining them back together and could end up putting them back together in an invalid order, leading to dumps which wouldn't restore. Fix this by adjusting the queries used by pg_dump to ensure that the ACLs are rebuilt in the same order in which they were originally. Back-patch to 9.6 where the changes for initial privileges were done.
Diffstat (limited to 'src/backend/executor/nodeModifyTable.c')
0 files changed, 0 insertions, 0 deletions