Fix dumping of security_barrier views with circular dependencies.
authorTom Lane <[email protected]>
Tue, 21 Aug 2012 19:18:36 +0000 (15:18 -0400)
committerTom Lane <[email protected]>
Tue, 21 Aug 2012 19:19:12 +0000 (15:19 -0400)
commit1ace786878b7f71547faa427c323fffb29cefea6
tree7aeb678e8d49ac879540131cccdcfb6e65d3c987
parente0badf67e9cd409ea35f2c2d5e3ca36ffecb47d7
Fix dumping of security_barrier views with circular dependencies.

If a view has circular dependencies, pg_dump splits it into a CREATE TABLE
and a CREATE RULE command to break the dependency loop.  However, if the
view has reloptions, those options cannot be applied in the CREATE TABLE
command, because views and tables have different allowed reloptions so
CREATE TABLE would reject them.  Instead apply the reloptions after the
CREATE RULE, using ALTER VIEW SET.
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/pg_dump.h
src/bin/pg_dump/pg_dump_sort.c