Hi,
this is the first time for me to post into this mailing list so
let me introduce myself: I'm working at a little software company
in Germany. We run a mixed Linux/Windows network. The workhorse is
a Linux Server running named, apache, samba and last not least a
PostgresQL 7.0.2 service.
Now my question: I tried to write a PL/PGSQL function that returns
a query result:
CREATE FUNCTION pms() RETURNS pmsummen AS '
declare
result pmsummen;
BEGIN
select into result * from pmsummen;
return result;
END;
' LANGUAGE 'plpgsql';
SELECT pms(); yields the error
NOTICE: plpgsql: ERROR during compile of pms near line 2
ERROR: parse error at or near "pmsummen"
I tried lots of variations of this function (employing PERFORM,
replacing pmsummen by record, ...) but everything failed. My
first intention was to write a parameterized view but this
doesn't seem to exist in PostgresQL so I tried to write a
function returning a query result. Thanks for your help.
Peter.
PS: Are there any pgsql newsgroups? Has muc.lists.postgres.
question something in common with this mailing list?
Peter.
--
------------------------------------------------------------------
Peter Maas, m+r infosysteme, D-52070 Aachen, Hubert-Wienen-Str. 24
Tel +49-241-875094 Fax +49-241-875095 eMail pm@mrinfo.de
------------------------------------------------------------------