Stephen Frost <sfrost(at)snowman(dot)net> writes:
> * S G (sgennaria2(at)gmail(dot)com) wrote:
>> I guess to really get down to the issue, I'm curious if what I'm doing is
>> considered 'standard procedure' to others-- i.e. using funny workarounds
>> like building the query in a text var and executing it with plpgsql's RETURN
>> QUERY EXECUTE command.
> It's certainly not unusual when it's necessary. We do try to minimize
> the times it's necessary by making the planner as smart as possible.
Yeah. This is a known sore spot that I hope to do something about in
the 9.1 development cycle.
regards, tom lane