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

From Pierre-Frédéric Caillaud
Subject Re: select single entry and its neighbours using direct-acess to index?
Date
Msg-id opsilfna03cq72hf@musicbox
Whole thread Raw
In response to Re: select single entry and its neighbours using direct-acess to index?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: select single entry and its neighbours using direct-acess to index?  (Greg Stark <gsstark@mit.edu>)
List pgsql-general
>>     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 by date:

Previous
From: "C G"
Date:
Subject: triggers, transactions and locks
Next
From: Tom Lane
Date:
Subject: Re: Performance tuning on RedHat Enterprise Linux 3