Re: [badalex@gmail.com: Re: [BUGS] Problem identifying constraints which should not be inherited] - Mailing list pgsql-patches

From Alex Hunsaker
Subject Re: [badalex@gmail.com: Re: [BUGS] Problem identifying constraints which should not be inherited]
Date
Msg-id 34d269d40803291840g6c4b667cye8fee0dde56b90fd@mail.gmail.com
Whole thread Raw
In response to [badalex@gmail.com: Re: [BUGS] Problem identifying constraints which should not be inherited]  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: [badalex@gmail.com: Re: [BUGS] Problem identifying constraints which should not be inherited]  (NikhilS <nikkhils@gmail.com>)
List pgsql-patches
(trimmed cc's)

Find attached inherited_constraint_v2.patch

Changes since v1:
-rebased against latest HEAD
-changed enum { Anum_pg_constraint_... } back into #define
Anum_pg_constraint_...
-remove whitespace damage I added
-fixed regression tests I added to be more robust
-fixed
   create table ac (a int constraint check_a check (a <> 0));
   create table bc (a int constraint check_a check (a <> 0)) inherits (ac);
   so it properly works (removed crud I put into
AddRelationRawConstraints and created a proper fix in DefineRelation)

diffstat to head:
 src/backend/catalog/heap.c                |   15 +-
 src/backend/catalog/index.c               |    4 +-
 src/backend/catalog/pg_constraint.c       |    7 +-
 src/backend/commands/tablecmds.c          |  488 ++++++++++++++++++++++-------
 src/backend/commands/typecmds.c           |    4 +-
 src/backend/nodes/copyfuncs.c             |    2 +
 src/backend/nodes/equalfuncs.c            |    2 +
 src/backend/nodes/outfuncs.c              |    3 +
 src/backend/parser/gram.y                 |    4 +
 src/backend/parser/parse_utilcmd.c        |    5 +
 src/backend/utils/cache/catcache.c        |    2 +-
 src/backend/utils/cache/syscache.c        |   12 +
 src/include/access/tupdesc.h              |    6 +-
 src/include/catalog/catversion.h          |    2 +-
 src/include/catalog/indexing.h            |    2 +
 src/include/catalog/pg_constraint.h       |   51 ++--
 src/include/nodes/parsenodes.h            |    4 +-
 src/include/utils/syscache.h              |   99 +++---
 src/test/regress/expected/alter_table.out |    2 +-
 src/test/regress/expected/inherit.out     |   76 +++++
 src/test/regress/sql/inherit.sql          |   38 +++
 21 files changed, 637 insertions(+), 191 deletions(-)

Attachment

pgsql-patches by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: create language ... if not exists
Next
From: Tom Lane
Date:
Subject: Re: create language ... if not exists