From: | Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr> |
---|---|
To: | "Karl O(dot) Pinc" <kop(at)meme(dot)com> |
Cc: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: gset updated patch |
Date: | 2012-11-19 16:12:57 |
Message-ID: | m2fw45sh9y.fsf@2ndQuadrant.fr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
"Karl O. Pinc" <kop(at)meme(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2012-11-19 16:25:23 | Re: Dumping an Extension's Script |
Previous Message | Tom Lane | 2012-11-19 16:04:31 | Re: [RFC] Fix div/mul crash and more undefined behavior |