Re: If an index is based on 3 columns will a query using two of the columns utilize the index? - Mailing list pgsql-general

From Tom Lane
Subject Re: If an index is based on 3 columns will a query using two of the columns utilize the index?
Date
Msg-id 22924.1126543189@sss.pgh.pa.us
Whole thread Raw
In response to Re: If an index is based on 3 columns will a query using  (Teodor Sigaev <teodor@sigaev.ru>)
List pgsql-general
Teodor Sigaev <teodor@sigaev.ru> writes:
> GiST may work with any subset of index columns too. Even in existing code I
> don't see any problem except NULL in a first column. GiST doesn't store tuples
> with leading NULL value (gist.c lines 174, 326), so index doesn't contained them.

Well, that's exactly the problem :-(.  Or at least one of the problems;
the other being what you'd use as search key to find such tuples.

> After our work about WAL-lization GiST, it may work with "invalid"
> tuples (possibly occured after crash recovery), so itsn't a big deal
> to add support NULL in a first column. But freeze date is
> outdated... Should I add or leave it to 8.2?

Too late for 8.1 I'd say --- this definitely sounds like a new feature
rather than a bug fix.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: If an index is based on 3 columns will a query using two of the columns utilize the index?
Next
From: "Simon Riggs"
Date:
Subject: Re: Replication