On 25.9.2015 13:08, Ramesh T wrote:
> CREATE UNIQUE INDEX idx_load_pick ON pick (case picked when picked='y' then
> load_id else null end );
>
> how can i convert case expressed to postgres..above it is oracle.
>
> any help appreciated...
Hello.
And what about a partial unique index as documented here:
http://www.postgresql.org/docs/9.4/static/indexes-partial.html
I.e.:
CREATE UNIQUE INDEX ON pick (load_id) WHERE picked = 'y';
HTH,
Ladislav Lenart