Re: gset updated patch - Mailing list pgsql-hackers

From Dimitri Fontaine
Subject Re: gset updated patch
Date
Msg-id m2fw45sh9y.fsf@2ndQuadrant.fr
Whole thread Raw
In response to Re: gset updated patch  ("Karl O. Pinc" <kop@meme.com>)
Responses Re: gset updated patch  (Piyush Newe <piyush.newe@enterprisedb.com>)
List pgsql-hackers
"Karl O. Pinc" <kop@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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [RFC] Fix div/mul crash and more undefined behavior
Next
From: Robert Haas
Date:
Subject: Re: Dumping an Extension's Script