Re: [badalex@gmail.com: Re: [BUGS] Problem identifying constraints which should not be inherited]

From: "Alex Hunsaker" <badalex(at)gmail(dot)com>
To: "Pg Patches" <pgsql-patches(at)postgresql(dot)org>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, NikhilS <nikkhils(at)gmail(dot)com>
Subject: Re: [badalex@gmail.com: Re: [BUGS] Problem identifying constraints which should not be inherited]
Date: 2008-03-30 01:40:19
Message-ID: 34d269d40803291840g6c4b667cye8fee0dde56b90fd@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers 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 Content-Type Size
inherited_constraints_v2.patch application/octet-stream 52.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Hunter 2008-03-30 02:54:16 Re: Connection to PostgreSQL Using Certificate: Wrong Permissions on Private Key File
Previous Message Brendan Jurd 2008-03-29 23:39:35 printTable API (was: Show INHERIT in \du)

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2008-03-30 02:35:21 Re: create language ... if not exists
Previous Message Brendan Jurd 2008-03-29 23:39:35 printTable API (was: Show INHERIT in \du)