Re: GiST, Not Using Index - Mailing list pgsql-sql

From Tom Lane
Subject Re: GiST, Not Using Index
Date
Msg-id 29842.1046385523@sss.pgh.pa.us
Whole thread Raw
In response to Re: GiST, Not Using Index  (Itai Zukerman <zukerman@math-hat.com>)
List pgsql-sql
Itai Zukerman <zukerman@math-hat.com> writes:
>> Never leave out the "unimportant" stuff --- that's usually where you
>> went wrong ;-)

> OK, I've attached below the SQL I use to generate stuff and an
> interactive session with the "explain" etc.

Ah.  Your problem is you need to mark sig_in() as IMMUTABLE, or at least
STABLE, for an expression involving sig_in() to be considered safe to
index.  If it's in C, more than likely it'd best be marked STRICT too
(else you'd better have explicit NULL checks in the function code).

Don't forget to look at your other custom functions too, to see if
they're correctly marked.
        regards, tom lane


pgsql-sql by date:

Previous
From: Itai Zukerman
Date:
Subject: Re: GiST, Not Using Index
Next
From: Denis Zaitsev
Date:
Subject: Are scalar type's in/out functions implicitly STRICT?