ADD/DROP constraints - Mailing list pgsql-hackers

From Greg Stark
Subject ADD/DROP constraints
Date
Msg-id 873befjspt.fsf@stark.xeocode.com
Whole thread Raw
Responses Re: ADD/DROP constraints  (Hannu Krosing <hannu@skype.net>)
Re: ADD/DROP constraints  ("Jim C. Nasby" <jnasby@pervasive.com>)
Re: ADD/DROP constraints  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On a separate note. The one major remaining piece here is in constraints. I'm
thinking what I have to check is that every constraint present on the parent
table is present on the child tables. And I'm thinking I should do that by
looking at the constraint's textual definition (consrc).

This doesn't allow you to get by with a single stronger constraint -- you
would still need the redundant looser constraint to satisfy the inheritance.

But it does let you get by with constraint names that don't match the
parent's.

I'm not sure that's such a good thing, since pg_dump would then generate a
redundant constraint when it generates the table. Maybe that would go if
constraints got conislocal and coninh.

Or maybe I should insist that a matching constraint name be present *and* that
the source text match? That's more of a pain to code though.

Is there a convenient hash module in the source for small simple hashes that
don't require disk spilling? Just a string->string thing I could look up
constraint definitions by name from?

-- 
greg



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: ADD/DROP INHERITS
Next
From: "Jim C. Nasby"
Date:
Subject: Re: PG 8.2