PROBLEM WITH FUNCTIONS IN POSTGRES

From: "Mario Alberto Soto Cordones" <mario_soto(at)compuall(dot)cl>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: PROBLEM WITH FUNCTIONS IN POSTGRES
Date: 2003-03-20 17:07:29
Message-ID: 1454.192.168.1.100.1048180049.squirrel@mail.compuall.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Victor Yegorov 2003-03-20 17:22:42 Re: PROBLEM WITH FUNCTIONS IN POSTGRES
Previous Message Mario Alberto Soto Cordones 2003-03-20 16:32:22 HELP