[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
[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
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''
> >
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
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