X-Original-To: pgsql-admin@postgresql.org Received: from localhost.localdomain (50-126-125.leased.cust.tie.cl [200.50.126.125]) by postgresql.org (Postfix) with ESMTP id 07F84475CA9 for ; Thu, 20 Mar 2003 12:03:34 -0500 (EST) Received: from localhost.localdomain (lautaro [127.0.0.1]) by localhost.localdomain (8.12.8/8.12.5) with ESMTP id h2KH7TXb013417 for ; Thu, 20 Mar 2003 13:07:30 -0400 Received: (from apache@localhost) by localhost.localdomain (8.12.8/8.12.5/Submit) id h2KH7TV1013415; Thu, 20 Mar 2003 13:07:29 -0400 X-Authentication-Warning: localhost.localdomain: apache set sender to mario_soto@compuall.cl using -f Received: from 192.168.1.100 (SquirrelMail authenticated user mario_soto) by mail.compuall.cl with HTTP; Thu, 20 Mar 2003 13:07:29 -0400 (CLT) Message-ID: <1454.192.168.1.100.1048180049.squirrel@mail.compuall.cl> Date: Thu, 20 Mar 2003 13:07:29 -0400 (CLT) Subject: PROBLEM WITH FUNCTIONS IN POSTGRES From: "Mario Alberto Soto Cordones" To: X-Priority: 1 Importance: High X-Mailer: SquirrelMail (version 1.2.10) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Archive-Number: 200303/327 X-Sequence-Number: 7967 Hi... i create a function in postgres to return a data of a table but when try to create say PostgreSQL ha dicho: ERROR: parser: parse error at or near "text" Your query: CREATE FUNCTION sinomemp(text) RETURNS text AS 'DECLARE sinomemp TEXT; BEGIN SELECT name FROM simaemp WHERE cod = $1; RETURN sinomemp; END;' LANGUAGE 'sql' please help me