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

Re: pg_constraint

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
Cc: "Rod Taylor" <rbt(at)zort(dot)ca>,"Hackers List" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_constraint
Date: 2002-04-26 14:50:32
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
"Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au> writes:
> Hmmm...I don't see the need at all for NOT NULL constraint tracking.  The
> spec doesn't seem to require it and we do not have names for them anyway.
> Even if they were given names, it'd be pointless, as there's only one per
> column.

Hmm, you're probably right.  Way back when, I was thinking of naming
them as a route to allowing DROP CONSTRAINT for them --- but given the
ALTER TABLE SET/DROP NOT NULL syntax that we have now, supporting DROP
CONSTRAINT is not really necessary.  So I concur that not-null isn't a
feature that pg_constraint needs to deal with.

> Why not just create a pg_references table and leave pg_relcheck as is?

One reason is that that structure wouldn't guarantee that
check-constraint names are distinct from references/unique-constraint
names, which'd make life difficult for DROP CONSTRAINT.

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Rod TaylorDate: 2002-04-26 14:58:53
Subject: Re: pg_constraint
Previous:From: Bruce MomjianDate: 2002-04-26 14:49:55
Subject: Re: Vote totals for SET in aborted transaction

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