Re: [NOVICE] Boolean column in multicolumn index - Mailing list pgsql-novice

From Gerald Cheves
Subject Re: [NOVICE] Boolean column in multicolumn index
Date
Msg-id f955c2f2-609a-b6a4-8300-0ca0a3eada81@verizon.net
Whole thread Raw
In response to Re: [NOVICE] Boolean column in multicolumn index  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-novice
On 12/10/2016 7:04 PM, Tom Lane wrote:
CREATE INDEX "right" ON public.t USING btree (ci, cb, co);
CREATE INDEX wrong ON public.t USING btree (ci, co);
CREATE INDEX right_hack ON public.t USING btree (ci, (cb::integer), co);
The problem is that I can't force PostgreSQL to use the "right" index.

Why is only right in parenthesis but the other indices are not?

-- 
siamo arrivati sani e salvi

pgsql-novice by date:

Previous
From: Dima Pavlov
Date:
Subject: Re: [NOVICE] Boolean column in multicolumn index
Next
From: Gerald Cheves
Date:
Subject: Re: [NOVICE] Boolean column in multicolumn index