summaryrefslogtreecommitdiff
path: root/src/bin/pg_dump/pg_dump.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-05-09 23:32:05 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-05-09 23:32:05 +0000
commitcd902b331dc4b0c170e800441a98f9213d98b46b (patch)
treebef3eacf7ff474dd0fb96b368e80137f73658d52 /src/bin/pg_dump/pg_dump.h
parentf8df836ae396be28a6c9e4f79a6adf3e5c0187b5 (diff)
downloadpostgresql-cd902b331dc4b0c170e800441a98f9213d98b46b.tar.gz
Change the rules for inherited CHECK constraints to be essentially the same
as those for inherited columns; that is, it's no longer allowed for a child table to not have a check constraint matching one that exists on a parent. This satisfies the principle of least surprise (rows selected from the parent will always appear to meet its check constraints) and eliminates some longstanding bogosity in pg_dump, which formerly had to guess about whether check constraints were really inherited or not. The implementation involves adding conislocal and coninhcount columns to pg_constraint (paralleling attislocal and attinhcount in pg_attribute) and refactoring various ALTER TABLE actions to be more like those for columns. Alex Hunsaker, Nikhil Sontakke, Tom Lane
Diffstat (limited to 'src/bin/pg_dump/pg_dump.h')
-rw-r--r--src/bin/pg_dump/pg_dump.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/pg_dump/pg_dump.h b/src/bin/pg_dump/pg_dump.h
index d4b40e9d88..8fbe98221b 100644
--- a/src/bin/pg_dump/pg_dump.h
+++ b/src/bin/pg_dump/pg_dump.h
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.h,v 1.139 2008/01/01 19:45:55 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.h,v 1.140 2008/05/09 23:32:04 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -353,7 +353,7 @@ typedef struct _constraintInfo
char contype;
char *condef; /* definition, if CHECK or FOREIGN KEY */
DumpId conindex; /* identifies associated index if any */
- bool coninherited; /* TRUE if appears to be inherited */
+ bool conislocal; /* TRUE if constraint has local definition */
bool separate; /* TRUE if must dump as separate item */
} ConstraintInfo;