Re: [SQL] [BUGS] session variable

2003-09-17 Thread Tom Lane
[EMAIL PROTECTED] (Miko O'Sullivan) writes: > Unfortunately in the 7.2.x version I have available, EXECUTE does not > allow "select into". The docs suggests a technique for using a FOR > loop to extract information from an EXECUTE, but the technique only > works for finite set of expected variable

Re: [SQL] [BUGS] session variable

2003-09-17 Thread Miko O'Sullivan
[EMAIL PROTECTED] (Bruce Momjian) wrote in message news:<[EMAIL PROTECTED]>... > Yes, see the FAQ. You have to use EXECUTE for temp table access in > functions. Unfortunately in the 7.2.x version I have available, EXECUTE does not allow "select into". The docs suggests a technique for using a FO

Re: [SQL] [BUGS] session variable

2003-09-03 Thread Bruce Momjian
Peter Eisentraut wrote: > sad writes: > > > The first problem using temp table is: > > > > CREATE TABLE locals (name text, value text); > > > > CREATE OR REPLACE FUNCTION test_locals_access() RETURNS text AS ' > > DECLARE i text; > > BEGIN > > SELECT value INTO i FROM locals WHERE name=''n1'' > >

Re: [SQL] [BUGS] session variable

2003-09-03 Thread Peter Eisentraut
sad writes: > The first problem using temp table is: > > CREATE TABLE locals (name text, value text); > > CREATE OR REPLACE FUNCTION test_locals_access() RETURNS text AS ' > DECLARE i text; > BEGIN > SELECT value INTO i FROM locals WHERE name=''n1'' > RETURN i; > END; > ' LANGUAGE 'plpgsql'; > > S

Re: [SQL] [BUGS] session variable

2003-09-02 Thread sad
On Tuesday 02 September 2003 16:40, you wrote: > No problem to use a temp table in a trigger (which is local to the > session), I do so myself. Still, session variables would be nice, making > coding a little bit more comfortable. (it would be very good if you implement session variables in Post