temp table creation - Mailing list pgsql-general

From Alfonso Peniche
Subject temp table creation
Date
Msg-id 3A8B2C47.465BBF9@iteso.mx
Whole thread Raw
Responses Re: temp table creation  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
What's wrong with this function? The syntax is supposed to be right,
isn't it?

Create function UsaTablaTemporal()
RETURNS integer
AS '
    BEGIN

 SELECT p.apellidos, p.nombres, u.username
        INTO TEMP TABLE mitabla
        FROM persona p, usuario u
        WHERE p.idpersona = u.idusuario
          AND p.idpersona = 3278;

        RETURN 1;

    END;'
LANGUAGE 'plpgsql';

If I run:
select usatablatemporal();

I get the message:
ERROR:  parser: parse error at or near "temp"

Thanx


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Postmaster crashes
Next
From: Tom Lane
Date:
Subject: Re: temp table creation