[EMAIL PROTECTED] wrote:
CREATE UNIQUE INDEX name on table(param1,param2);

How to create such unique index when param2 is bool type, and this param2 
should be accepted only in case of true ?

I tried: CREATE UNIQUE INDEX name on table(param1,(param2 = 'true'));
but it's not working.

CREATE UNIQUE INDEX name ON table(param1, param2) WHERE param2 = true;

Regards,

--
Alban Hertroys
MAG Productions

T: +31(0)53 4346874
F: +31(0)53 4346876
E: [EMAIL PROTECTED]
W: http://www.magproductions.nl

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Reply via email to