Re: [HACKERS] Variable assignment from dynamic SQL in PL/PgSQL

2004-09-22 Thread Robert Treat
On Tue, 2004-09-21 at 23:28, David Fetter wrote: > Kind people, > > I've figured out something that many others probably have, but I > thought I'd put it out there anyhow. > > As PL/PgSQL doesn't allow assignment of singleton SELECTs and dynamic > queries to variables, as mentioned in the docs. >

[HACKERS] Variable assignment from dynamic SQL in PL/PgSQL

2004-09-21 Thread David Fetter
Kind people, I've figured out something that many others probably have, but I thought I'd put it out there anyhow. As PL/PgSQL doesn't allow assignment of singleton SELECTs and dynamic queries to variables, as mentioned in the docs. Here's a working hack that gets around this. DECLARE foo_rec R