"Karl O. Pinc" <k...@meme.com> writes: > Yes. I'm wrong. For some reason I thought you could use DO to make > an anonymous code block that would act as a SETOF function, > allowing RETURN NEXT expr (et-al) to be used in the > plpgsql code, allowing DO to return table results. > (Or, perhaps, instead, be used in place of a table in a SELECT > statement.) Oh well.
My key for remembering about that point is that DO is a utility command, not a query. Now, the proposal I pushed last time we opened that very can of worms was to have inline functions rather than anonymous code blocks: WITH FUNCTION foo(integer) returns bigint language SQL AS $$ SELECT $1 + 1; $$, Not sure how much that relates to $topic, but still something that raises in my mind with enough presence that I need to write about it so that it stops calling for attentionĀ :) Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers