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