Re: [HACKERS] SetOf Functions

2005-08-19 Thread Andrew Dunstan
Joshua D. Drake wrote: Hello, O.k. I know I can do: CREATE FUNCTION foo() RETURNS SET OF text AS ' ' language SQL; Does anyone else think it would be nice to be able to do: CREATE FUNCTION foo() RETURNS SET OF text,int4,float,timestamp AS ' ' language SQL; ? We could even extend it far

Re: [HACKERS] SetOf Functions

2005-08-19 Thread Joshua D. Drake
Josh Berkus wrote: Josh, CREATE FUNCTION foo() RETURNS SET OF text,int4,float,timestamp AS ' ' language SQL; You can effectively do this with the new INOUT syntax. Check it out in the 8.1devel docs. Cool thanks... (takes note to document in the book) -- Your PostgreSQL solutions c

Re: [HACKERS] SetOf Functions

2005-08-19 Thread Joshua D. Drake
You mean like this? create type bar (firstname text, id int); create function foo() returns setof bar as ' ' language sql; No. I am aware I can do that ;) I don't want to have to create the type ahead of time :) Sincerely, Joshua D. Drake cheers andrew -- Your PostgreSQL solution

Re: [HACKERS] SetOf Functions

2005-08-19 Thread Josh Berkus
Josh, > CREATE FUNCTION foo() RETURNS SET OF text,int4,float,timestamp AS ' ' > language SQL; You can effectively do this with the new INOUT syntax. Check it out in the 8.1devel docs. -- Josh Berkus Aglio Database Solutions San Francisco ---(end of broadcast)-

[HACKERS] SetOf Functions

2005-08-19 Thread Joshua D. Drake
Hello, O.k. I know I can do: CREATE FUNCTION foo() RETURNS SET OF text AS ' ' language SQL; Does anyone else think it would be nice to be able to do: CREATE FUNCTION foo() RETURNS SET OF text,int4,float,timestamp AS ' ' language SQL; ? We could even extend it farther: CREATE FUNCTION foo(