Re: ADD/DROP INHERITS - Mailing list pgsql-patches

From Tom Lane
Subject Re: ADD/DROP INHERITS
Date
Msg-id 597.1149956586@sss.pgh.pa.us
Whole thread Raw
In response to ADD/DROP INHERITS  (Greg Stark <gsstark@mit.edu>)
Responses Re: ADD/DROP INHERITS  (Greg Stark <gsstark@mit.edu>)
List pgsql-patches
Greg Stark <gsstark@mit.edu> writes:
>    I also haven't checked the constraint name. To do so it would make sense to
>    use a small hash table.

No, it'd make sense to use strcmp().  It's unlikely that there will be
enough constraints attached to any one table to justify use of any but
the simplest algorithm.  AFAICS you should just iterate through the
child constraints looking for matches ... and I'd suggest checking the
name first, as that will save a whole lot more work in reverse-compiling
than any amount of tenseness in the matching code.

>    I'm ignoring unique, primary key, and foreign key constraints on the theory
>    that these things don't really work on inherited tables yet
>    anyways.

Yeah, the consistent thing to do with these is nothing, until something
is done about the generic problem.

            regards, tom lane

pgsql-patches by date:

Previous
From: Andrew Dunstan
Date:
Subject: drop if exists remnainder (reprise)
Next
From: Greg Stark
Date:
Subject: Re: ADD/DROP INHERITS