Re: partial unique constraint - Mailing list pgsql-sql

From Rod Taylor
Subject Re: partial unique constraint
Date
Msg-id 1081264668.56361.531.camel@jester
Whole thread Raw
In response to partial unique constraint  (Robert Treat <xzilla@users.sourceforge.net>)
List 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

pgsql-sql by date:

Previous
From: Paul Thomas
Date:
Subject: Re: partial unique constraint
Next
From: Ricardo Vaz Mannrich
Date:
Subject: SQL Standatd