Re: table vs. column constraints - Mailing list pgsql-novice

From Tom Lane
Subject Re: table vs. column constraints
Date
Msg-id 23157.1018296574@sss.pgh.pa.us
Whole thread Raw
In response to table vs. column constraints  (Tim Wilson <wilson@isis.visi.com>)
List pgsql-novice
Tim Wilson <wilson@isis.visi.com> writes:
> I'm having trouble understanding when to use table constraints vs.
> column ones.

There's no functional difference --- if you have a constraint that only
involves one column, you can write it either way.  Do what seems easier
to understand.

I believe pg_dump will dump all constraints as table constraints, so in
the long run it may not make any difference anyway ;-)

            regards, tom lane

pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: How to turn off referential integrity
Next
From: "Juliet May"
Date:
Subject: [Novice] questions on pg_hba.conf and stopping postmaster in cygwin