Received: from iteso.mx (iteso.mx [148.201.1.4]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f1F19bx04143 for ; Wed, 14 Feb 2001 20:09:37 -0500 (EST) (envelope-from alfonso@iteso.mx) Received: from iteso.mx (alfonso@[148.201.112.30]) by iteso.mx (8.11.1/8.11.1) with ESMTP id f1F19Q749763 for ; Wed, 14 Feb 2001 19:09:26 -0600 (CST) (envelope-from alfonso@iteso.mx) Message-ID: <3A8B2C47.465BBF9@iteso.mx> Date: Wed, 14 Feb 2001 19:09:27 -0600 From: Alfonso Peniche Organization: Iteso University X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.17 i686) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-general@postgresql.org Subject: temp table creation Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200102/686 X-Sequence-Number: 4582 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