Dean Rasheed <dean(dot)a(dot)rasheed(at)googlemail(dot)com> writes:
> 2010/1/9 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
>> I think that a variant of your idea could be made to work: change
>> plpgsql_LookupIdentifiers to a three-state variable (which'd basically
>> mean "in DECLARE, in a SQL expression, anywhere else"), do no lookups in
>> DECLARE, and in SQL expressions do lookups but never throw any errors.
>> I'll have a go at that.
> Sounds plausible.
I've applied a patch along these lines.
regards, tom lane