Re: partial unique constraint

From: Rod Taylor <rbt(at)rbt(dot)ca>
To: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: partial unique constraint
Date: 2004-04-06 15:17:49
Message-ID: 1081264668.56361.531.camel@jester
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Tue, 2004-04-06 at 10:29, Robert Treat wrote:
> Trying to come up with the proper syntax to meet the following criteria:
>
> create table foo (bar integer, baz boolean UNIQUE (bar, baz = true));

Tt takes 2 steps.

CREATE TABLE ...
CREATE UNIQUE INDEX ... (bar) WHERE baz = true;

--
Rod Taylor <rbt [at] rbt [dot] ca>

Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL
PGP Key: http://www.rbt.ca/signature.asc

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Achilleus Mantzios 2004-04-06 15:18:03 Re: partial unique constraint
Previous Message Tom Lane 2004-04-06 15:17:03 Re: partial unique constraint