Re: select single entry and its neighbours using direct-acess to index? - Mailing list pgsql-general

From Greg Stark
Subject Re: select single entry and its neighbours using direct-acess to index?
Date
Msg-id 87hdmz168u.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: select single entry and its neighbours using direct-acess to index?  (Pierre-Frédéric Caillaud<lists@boutiquenumerique.com>)
List pgsql-general
Pierre-Frédéric Caillaud <lists@boutiquenumerique.com> writes:

>     One could always use ARRAY[name,name2] > ARRAY['b','a']
>     But it is NOT index-friendly...

It won't use an existing two-column index but you can create an expression
index on array[name,name2] and this expression will use it. It won't work if
either column is NULL though.

--
greg

pgsql-general by date:

Previous
From: Greg Stark
Date:
Subject: Re: When to encrypt
Next
From: Andrew - Supernews
Date:
Subject: Re: Index scan vs. Seq scan on timestamps