Re: "RETURNS SETOF" function question - Mailing list pgsql-general

From Kynn Jones
Subject Re: "RETURNS SETOF" function question
Date
Msg-id c2350ba40802251410q2880bab9u53fbc921e619ab47@mail.gmail.com
Whole thread Raw
In response to Re: "RETURNS SETOF" function question  (Erik Jones <erik@myemma.com>)
List pgsql-general
On Sun, Feb 24, 2008 at 7:08 PM, Erik Jones <erik@myemma.com> wrote:

There was an article that covered this in the Postgres Online Journal
(http://www.postgresonline.com/journal/index.php?/categories/6-pl-programming).  Basically, do this:

CREATE OR REPLACE FUNCTION foo(text, text)
       RETURNS SETOF text
$$
       SELECT * FROM foo($1, $2);
$$
LANGUAGE sql;


That one goes straight into my (still tiny) bag o' Pg tricks.  It worked like a charm.

Thanks!

G.

pgsql-general by date:

Previous
From: "Andrus"
Date:
Subject: Re: Use index for upper(customername) like 'ABC%'
Next
From: Maciej Sieczka
Date:
Subject: how to auto GRANT custom ACL on a new table?