pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rod Taylor <rbt@rbt.ca>
To: Robert Treat <xzilla@users.sourceforge.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: partial unique constraint
Date: Tue, 06 Apr 2004 11:17:49 -0400
Message-ID: <1081264668.56361.531.camel@jester> (raw)
In-Reply-To: <1081261772.31785.48.camel@camel>
References: <1081261772.31785.48.camel@camel>

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

Attachments:

  signature.asc (application/pgp-signature, 186B) download

view thread (9+ messages)  latest in thread

Message-ID: <1081264668.56361.531.camel@jester>
Permalink:  ../1081264668.56361.531.camel@jester/
Also on:    postgresql.org/message-id/1081264668.56361.531.camel@jester

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: rbt@rbt.ca, xzilla@users.sourceforge.net
  Subject: Re: partial unique constraint
  In-Reply-To: <1081264668.56361.531.camel@jester>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox