Re: to pg - Mailing list pgsql-general

From Ladislav Lenart
Subject Re: to pg
Date
Msg-id 56054FB4.9020709@volny.cz
Whole thread Raw
In response to to pg  (Ramesh T <rameshparnanditech@gmail.com>)
List pgsql-general
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



pgsql-general by date:

Previous
From: Geoff Winkless
Date:
Subject: Re: to pg
Next
From: Albe Laurenz
Date:
Subject: Re: to pg