On Tuesday 06 April 2004 17:38, Robert Treat wrote:
> On Tue, 2004-04-06 at 11:17, Tom Lane wrote:
> > Robert Treat <[EMAIL PROTECTED]> writes:
> > > Trying to come up with the proper syntax to meet the following
> > > criteria: create table foo (bar integer, baz boolean UNIQUE (bar, baz =
> > > tr
On Tue, 2004-04-06 at 11:17, Tom Lane wrote:
> Robert Treat <[EMAIL PROTECTED]> writes:
> > Trying to come up with the proper syntax to meet the following criteria:
> > create table foo (bar integer, baz boolean UNIQUE (bar, baz = true));
>
> The correct way to do it is with a separate CREATE IND
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 Taylo
On 06/04/2004 15: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));
note the above syntax is not correct, but should demonstrate what i'm
trying to do; I want to add a unique constra
On Tue, 6 Apr 2004, 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));
>
> note the above syntax is not correct, but should demonstrate what i'm
> trying to do; I want to add a un
You should create a functional index here.
Ries
> -Oorspronkelijk bericht-
> Van: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Robert Treat
> Verzonden: dinsdag 6 april 2004 16:30
> Aan: [EMAIL PROTECTED]
> Onderwerp: [SQL] partial unique constraint
>
>
>
O kyrios Robert Treat egrapse stis Apr 6, 2004 :
> Trying to come up with the proper syntax to meet the following criteria:
>
> create table foo (bar integer, baz boolean UNIQUE (bar, baz = true));
You could simply leave your table as is.
A null vale on baz (equivalent of 'false') will have no
Robert Treat <[EMAIL PROTECTED]> writes:
> Trying to come up with the proper syntax to meet the following criteria:
> create table foo (bar integer, baz boolean UNIQUE (bar, baz = true));
The correct way to do it is with a separate CREATE INDEX command:
create table foo (bar integer, baz boolean
Trying to come up with the proper syntax to meet the following criteria:
create table foo (bar integer, baz boolean UNIQUE (bar, baz = true));
note the above syntax is not correct, but should demonstrate what i'm
trying to do; I want to add a unique constraint such that we only allow
one case of