PROBLEM WITH FUNCTIONS IN POSTGRES - Mailing list pgsql-admin

From Mario Alberto Soto Cordones
Subject PROBLEM WITH FUNCTIONS IN POSTGRES
Date
Msg-id 1454.192.168.1.100.1048180049.squirrel@mail.compuall.cl
Whole thread Raw
Responses Re: PROBLEM WITH FUNCTIONS IN POSTGRES
List 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




pgsql-admin by date:

Previous
From: "Mario Alberto Soto Cordones"
Date:
Subject: HELP
Next
From: "Victor Yegorov"
Date:
Subject: Re: PROBLEM WITH FUNCTIONS IN POSTGRES