Re: Correct syntax to create partial index on a boolean column

From: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "Mike Christensen *EXTERN*" <mike(at)kitchenpc(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Correct syntax to create partial index on a boolean column
Date: 2011-12-15 08:27:49
Message-ID: D960CB61B694CF459DCFB4B0128514C2073C8D1F@exadv11.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Mike Christensen wrote:
> For the boolean column Foo in Table1, if I want to index all values of
> TRUE, is this syntax correct?
>
> CREATE INDEX IDX_MyIndex ON Table1(Foo) WHERE Foo;

Yes, that is correct.

Yours,
Laurenz Albe

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bèrto ëd Sèra 2011-12-15 08:58:40 Re: Philosophical question
Previous Message Albe Laurenz 2011-12-15 08:26:47 Re: Locking Tables & Backup Inquiry