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

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: NikhilS <nikkhils(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [badalex@gmail.com: Re: [BUGS] Problem identifying constraints which should not be inherited]
Date: 2008-04-29 17:48:14
Message-ID: 34d269d40804291048q2c794f79qafbc3aa3ec9c1a02@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
On Tue, Apr 1, 2008 at 2:40 AM, NikhilS <nikkhils(at)gmail(dot)com> wrote:
> PFA, a revised version of Alex' patch. I have added the relevant pg_dump
> related changes too. As I mentioned earlier, I still don't know whether
> Alex' syscache related changes are necessary, but I will leave it to the
> patch reviewers to decide :)
>
> This combined patch meets the following TODOs:
>
>  * Add logic to disallow ADD CONSTRAINT ONLY to parent of an inheritance
> hierarchy
>
> * Add logic to mark inherited constraints in the children:
> This is achieved by introducing bool "conislocal" and int4 "coninhcount"
> attributes in pg_constraint. The behaviour of these 2 attributes is pretty
> similar to attislocal and attinhcount attributes in pg_attribute.
>
>  * Add logic to disallow dropping inherited constraints directly on children
>  Obviously they will get dropped if a DROP CONSTRAINT is fired on the
> parent. with recurse set to true (this is the default behaviour)
>
>  * Modify the pg_dump logic to use the new pg_constraint based attributes
> logic for versions above 80300 (or should it be PG_VERSION_NUM 80400?).
>
> Please direct comments/feedback towards both me and Alex.
>
>
> Regards,
> Nikhils
> --
> EnterpriseDB http://www.enterprisedb.com

Find attached v4 of the patch, changes since v3:

-updated/added catalog documentation for new coninhcount and conislocal columns.
-fixed some regression tests order by (causing them to fail randomly)
-some coding style fixes
-removed some unused vars

 Please direct comments/feedback towards both me and  NikhilS.

Attachment: inherited_constraints_v4.patch
Description: application/octet-stream (63.2 KB)

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2008-04-29 18:12:23
Subject: Re: [COMMITTERS] pgsql: Remove typename from A_Const.
Previous:From: Peter EisentrautDate: 2008-04-29 17:11:10
Subject: Re: Proposed patch - psql wraps at window width

pgsql-patches by date

Next:From: Steve CrawfordDate: 2008-04-29 20:34:19
Subject: psql \pset pager
Previous:From: Zubkovsky, SergeyDate: 2008-04-29 16:05:01
Subject: Re: [DOCS] pg_total_relation_size() and CHECKPOINT

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