Skip site navigation (1) Skip section navigation (2)

pgsql: Fix dumping of security_barrier views with circulardependencies

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix dumping of security_barrier views with circulardependencies
Date: 2012-08-21 19:20:59
Message-ID: E1T3u0Z-00071G-3b@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
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.

Branch
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/1ace786878b7f71547faa427c323fffb29cefea6

Modified Files
--------------
src/bin/pg_dump/pg_dump.c      |   25 +++++++++++++++++++++----
src/bin/pg_dump/pg_dump.h      |    2 ++
src/bin/pg_dump/pg_dump_sort.c |   13 +++++++++++--
3 files changed, 34 insertions(+), 6 deletions(-)

pgsql-committers by date

Next:From: Tom LaneDate: 2012-08-21 22:42:02
Subject: pgsql: Avoid somewhat-theoretical overflow risks in RecordIsValid().
Previous:From: Robert HaasDate: 2012-08-21 15:48:20
Subject: pgsql: Improve C comments in GetSnapshotData.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group