Re: Using functions as filters in queries - Mailing list pgsql-admin

From Tom Lane
Subject Re: Using functions as filters in queries
Date
Msg-id 477.1047512414@sss.pgh.pa.us
Whole thread Raw
In response to Re: Using functions as filters in queries  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-admin
Stephan Szabo <sszabo@megazone23.bigpanda.com> writes:
> On Wed, 12 Mar 2003, Tom Lane wrote:
>> I think the extra step to make this expression indexable is probably not
>> too hard: the constant-expression folder needs to be taught that
>> extracting a field from a whole-row Var can be replaced by a Var
>> reference to the field, ie, fold "(t.*).n" into "t.n".

> That's what I figured, but I wasn't sure if there was some case where it
> was unsafe.

I haven't thought it through either, but this particular example seems
safe.

            regards, tom lane

pgsql-admin by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Using functions as filters in queries
Next
From: P G
Date:
Subject: Re: I cannot get the db to initialize. Please help.