From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Fix pg_dump for better handling of inherited columns. |
Date: | 2012-02-10 18:28:59 |
Message-ID: | E1RvvDP-0007Zt-A3@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Fix pg_dump for better handling of inherited columns.
Revise pg_dump's handling of inherited columns, which was last looked at
seriously in 2001, to eliminate several misbehaviors associated with
inherited default expressions and NOT NULL flags. In particular make sure
that a column is printed in a child table's CREATE TABLE command if and
only if it has attislocal = true; the former behavior would sometimes cause
a column to become marked attislocal when it was not so marked in the
source database. Also, stop relying on textual comparison of default
expressions to decide if they're inherited; instead, don't use
default-expression inheritance at all, but just install the default
explicitly at each level of the hierarchy. This fixes the
search-path-related misbehavior recently exhibited by Chester Young, and
also removes some dubious assumptions about the order in which ALTER TABLE
SET DEFAULT commands would be executed.
Back-patch to all supported branches.
Branch
------
REL8_3_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/02e641818196420c97922326e5d67505a6e0d416
Modified Files
--------------
src/bin/pg_dump/common.c | 155 ++++++++++++++-------------------------------
src/bin/pg_dump/pg_dump.c | 115 +++++++++++++++++++++++++---------
src/bin/pg_dump/pg_dump.h | 15 +---
3 files changed, 139 insertions(+), 146 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2012-02-10 19:10:14 | pgsql: Fix brain fade in previous pg_dump patch. |
Previous Message | Tom Lane | 2012-02-10 07:33:07 | pgsql: Add ORDER BY to a query to prevent occasional regression test fa |