[HACKERS] Re: [SQL] PL/PGSQL function with parameters

2001-02-08 Thread Jan Wieck
Josh Berkus wrote: > Tom, Jan, Michael, > > > While I have not looked closely, I seem to recall that plpgsql handles > > INTO by stripping that clause out of the statement before it's passed to > > the SQL engine. Evidently that's not happening in the EXECUTE case. > > > > Jan, do you agree this

[HACKERS] Re: [SQL] PL/PGSQL function with parameters

2001-02-07 Thread Josh Berkus
Tom, Jan, Michael, > While I have not looked closely, I seem to recall that plpgsql handles > INTO by stripping that clause out of the statement before it's passed to > the SQL engine. Evidently that's not happening in the EXECUTE case. > > Jan, do you agree this is a bug? Is it reasonable to

[HACKERS] RE: [SQL] PL/PGSQL function with parameters

2001-02-07 Thread Michael Ansley
Title: RE: [SQL] PL/PGSQL function with parameters Yes, that was why I wrote it in the way that I did.  The table is effectively given a constant name, and the count is got from the table with a known name.  But of a kludge, but in 45sec, that was all I could come up with ;-) It would be VER

Re: [HACKERS] Re: [SQL] PL/PGSQL function with parameters

2001-02-06 Thread Tom Lane
Florent Guillaume <[EMAIL PROTECTED]> writes: > On this same subject, the plpgsql doc says to use > SELECT expression INTO var FROM ... > but Bruce's book, in several examples ("PL/PGSQL Functions" for instance, > node203.html) uses > SELECT INTO var expression FROM ... > Both should w

[HACKERS] Re: [SQL] PL/PGSQL function with parameters

2001-02-06 Thread Florent Guillaume
> > SQL = ''SELECT * INTO temp1 FROM '' || $1; > > I tried this, and it seems that "SELECT ... INTO foo" is not executed > correctly by EXECUTE --- the INTO is handled as an ordinary select-into- > table construct rather than plpgsql's select-into-variable. > > While I have not looked closel