Re: select single entry and its neighbours using direct-acess to index?
От
Pierre-Frédéric Caillaud
Тема
Re: select single entry and its neighbours using direct-acess to index?
Дата
Msg-id
opsilfna03cq72hf@musicbox
Ответ на
Список
Дерево обсуждения
Re: select single entry and its neighbours using direct-acess to index? Andrew - Supernews <andrew+nonews@supernews.com>
Re: select single entry and its neighbours using direct-acess to index? Pierre-Frédéric Caillaud<lists@boutiquenumerique.com>
Re: select single entry and its neighbours using direct-acess to index? Tom Lane <tgl@sss.pgh.pa.us>
Re: select single entry and its neighbours using direct-acess to index? Pierre-Frédéric Caillaud<lists@boutiquenumerique.com>
Re: select single entry and its neighbours using direct-acess to index? Greg Stark <gsstark@mit.edu>
>> I thought the planner had an automatic rewriter for these situations.
>
> No. There was a prior discussion of this, saying that we really ought
> to support the SQL-spec row comparison syntax:
What I meant was that I thought the planner could rewrite :
(A and C) or (A AND B) as A and (B or C)
which is more index-friendly.
> ... WHERE (name, name2) > ('b', 'a');
> which would map directly onto the semantics of a 2-column index. We
> don't have that functionality yet, though (we take the syntax but the
> semantics are not SQL-compliant) let alone any ability to pass it
> through to a 2-column index.
One could always use ARRAY[name,name2] > ARRAY['b','a']
But it is NOT index-friendly...
В списке pgsql-general по дате отправления