Re: pg_constraint - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject Re: pg_constraint
Date
Msg-id GNELIHDDFBOCMGBFGEFOIEEKCCAA.chriskl@familyhealth.com.au
Whole thread Raw
In response to pg_constraint  ("Rod Taylor" <rbt@zort.ca>)
Responses Re: pg_constraint  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> For tracking of Foreign Keys, Check constraints, and maybe NULL / NOT
> NULL (specific type of check constraint) I intend to create (as per
> suggestion) pg_constraint.

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.

Primary keys and unique keys are SQL constraints - are you going to bother
tracking them as well or leave them in the current format?  Maybe you could
do it with a view or something.

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

Chris



pgsql-hackers by date:

Previous
From: Curt Sampson
Date:
Subject: Re: WAL -> Replication
Next
From: Lee Kindness
Date:
Subject: Re: Vote totals for SET in aborted transaction