Re: pg_constraint - Mailing list pgsql-hackers

From Rod Taylor
Subject Re: pg_constraint
Date
Msg-id 1cc801c1ed47$d6e41fa0$ad02000a@jester
Whole thread Raw
In response to pg_constraint  ("Rod Taylor" <rbt@zort.ca>)
List pgsql-hackers
> > The only problem with this is that I don't want the rename of a
> > constraint to have to fall over into the pg_depend table.
pg_depend
> > is currently happy with system OIDS or a Relation OID and some
unique
> > number to represent it -- much as pg_description wouldn't want to
know
> > the name of the constraint for the ability to add a comment to it.
>
> Good points, but I think those argue for assigning OIDs to
constraints
> after all.  If that is what you want connum for then I have a *big*

Yes, OIDs are probably the right way to go.

> problem with it: aren't you assuming that connum will be distinct
from
> any attribute number that the relation might have?  What's going to

As far as pg_depend goes, it doesn't care whether they overlap or not
as it knows the source (class) relation is pg_constraint.

Comment on stuff would need to be changed though.

> I had once thought that we could avoid assigning OIDs to rules and
> triggers, but learned differently as I got into the implementation.
> I'm thinking that constraints will be the same kind of thing; it'll
> be a lot easier if you give them OIDs.

Sounds like a plan.  I'll




pgsql-hackers by date:

Previous
From: "Marc G. Fournier"
Date:
Subject: Re: Vote totals for SET in aborted transaction
Next
From: Bruce Momjian
Date:
Subject: Re: Vote totals for SET in aborted transaction