Re: Using functions as filters in queries

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
Cc: Chris Mungall <cjm(at)fruitfly(dot)org>, pgsql-admin(at)postgresql(dot)org
Subject: Re: Using functions as filters in queries
Date: 2003-03-12 23:40:14
Message-ID: 477.1047512414@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message P G 2003-03-12 23:50:07 Re: I cannot get the db to initialize. Please help.
Previous Message Stephan Szabo 2003-03-12 23:09:17 Re: Using functions as filters in queries