On Tue, 6 Feb 2007, Pavel Stehule wrote: > Hello, > > Currently PostgreSQL support set returning functions. > > ANSI SQL 2003 goes with new type of functions - table functions. With this > syntax > > CREATE FUNCTION foo() RETURNS TABLE (c1 t1, ... ) > > PostgreSQL equal statements are: > > CREATE TYPE tmptype AS (c1 t1, ...) > CREATE FUNCTION ... RETURNS SETOF tmptype AS ...
or you can do CREATE FUNCTION foo(OUT c1 t1, OUT ...) RETURNS SETOF record AS ... But I think this would be nice, I think the OUT parameters make less sense than saying RETURNS TABLE(...). But what about functions not returning SETOF? -- The Schwine-Kitzenger Institute study of 47 men over the age of 100 showed that all had these things in common: (1) They all had moderate appetites. (2) They all came from middle class homes (3) All but two of them were dead. ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly