ADD/DROP constraints

From: Greg Stark <gsstark(at)mit(dot)edu>
To: pgsql-hackers(at)postgresql(dot)org
Subject: ADD/DROP constraints
Date: 2006-06-08 20:30:22
Message-ID: 873befjspt.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim C. Nasby 2006-06-08 20:34:04 Re: PG 8.2
Previous Message Tom Lane 2006-06-08 20:28:40 Re: ADD/DROP INHERITS