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);
create unique index fooi on foo (bar) where baz = true;

Personally I'd spell that last as just "where baz" ...

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

Reply via email to