On Tue, Nov 23, 2004 at 10:33:50AM -0500, Tom Lane wrote:
> We do need to do something about the fact that EXECUTE can't access
> plpgsql variables, though I'm afraid that fixing that is going to
> require a rather complete overhaul of plpgsql :-(.  But it needs one
> anyway.

Why do you think that it would be difficult to do it with the existing code?
Actually I wanted to implement this for 8.1. I've already had a quick look
at it. My idea was to allow something like "EXECUTE SELECT INTO var1, var2
col1 col2 FROM ...". The code would have to parse the list of variables and
check if they match pl/pgsql variables, execute the query (without the INTO
stuff of course) via SPI and copy back the results, checking type mismatches
or a mismatch in the number of columns. I haven't thought about more complex
types however. Did I miss something?

Which other limitations are there in the current implementation of pl/pgsql?

Joachim




---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Reply via email to