Re: cross-table unique constraint - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: cross-table unique constraint
Date
Msg-id 20040109041348.GB31586@wolff.to
Whole thread Raw
In response to cross-table unique constraint  (Randall Smith <randall@tnr.cc>)
Responses Re: cross-table unique constraint
List pgsql-general
On Tue, Jan 06, 2004 at 07:10:28 +0000,
  Randall Smith <randall@tnr.cc> wrote:
> Is it possible to create a unique constraint on multiple fields in
> related tables?

Not with the normal UNIQUE constraint. That will do multiple columns in
one table, but won't span tables.

You can probably do what you want using triggers.

pgsql-general by date:

Previous
From: Mike Mascari
Date:
Subject: Re: Using indices with long unique IDs.
Next
From: Bruno Wolff III
Date:
Subject: Re: Simulation output using libpq