CHECK constraint so that only one is TRUE?

From: incognit(at)unifiedmind(dot)com (+I)
To: pgsql-general(at)postgresql(dot)org
Subject: CHECK constraint so that only one is TRUE?
Date: 2002-01-12 19:04:06
Message-ID: ebcd475a.0201121104.62d46853@posting.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

How would you write a check constraint to ensure that only one column,
of type boolean, is set to TRUE for a given ID?

Thanks.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message elisabeth maniez 2002-01-12 19:30:44 How to send automatically a NOTIFY when a COMMIT is done ?
Previous Message Tom Lane 2002-01-12 16:28:28 Re: Does pg_dumpall do BLOBs too?