Re: [GENERAL] "RETURNS SETOF" function question

2008-02-25 Thread Kynn Jones
On Sun, Feb 24, 2008 at 7:08 PM, Erik Jones <[EMAIL PROTECTED]> 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

Re: [GENERAL] "RETURNS SETOF" function question

2008-02-24 Thread Erik Jones
On Feb 24, 2008, at 4:19 PM, Kynn Jones wrote: Suppose that stored procedure foo has the signature: foo( text, text ) RETURNS SETOF text Also, I have some table bar, and that column bar.baz is of type text. Now, I'd like to run something like SELECT foo( "frobozz", baz ) FROM bar; If

[GENERAL] "RETURNS SETOF" function question

2008-02-24 Thread Kynn Jones
Suppose that stored procedure foo has the signature: foo( text, text ) RETURNS SETOF text Also, I have some table bar, and that column bar.baz is of type text. Now, I'd like to run something like SELECT foo( "frobozz", baz ) FROM bar; If I try this psql complains that I'm trying to execute