Re: SETOF - Mailing list pgsql-general

From Tom Lane
Subject Re: SETOF
Date
Msg-id 27664.1046801456@sss.pgh.pa.us
Whole thread Raw
In response to SETOF  (Fernando <fernando@icreativa.com.mx>)
List pgsql-general
Fernando <fernando@icreativa.com.mx> writes:
> I am using Postgresql version 7.2.2

> CREATE FUNCTION ejem1(varchar) RETURNS SETOF to varchar as'
> SELECT names from mi_tabla WHERE city = $1; '
> language ' SQL ';

It's difficult to do anything very useful with functions returning sets
in 7.2.  Update to 7.3 and try something like:
    select * from ejem1('cityname');

            regards, tom lane

PS: it's not really necessary to post the same question in three
different PG lists.  Especially not one at a time.

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: plpgsql mixing variable in SELECT INTO ?
Next
From: Dennis Gearon
Date:
Subject: Re: foreign key constraint