From: | Stephen Frost <sfrost(at)snowman(dot)net> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | David Fetter <david(at)fetter(dot)org>, Hannu Krosing <hannu(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: DO ... RETURNING |
Date: | 2013-06-10 20:34:12 |
Message-ID: | 20130610203411.GB7200@tamriel.snowman.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
* Pavel Stehule (pavel(dot)stehule(at)gmail(dot)com) wrote:
> not too much. Two different concepts in one statement is not good
> idea.
What are the different concepts..? We already have set returning
functions, why would set returning anonymous functions be any different?
> What using a cursors as temporary solution?
That only works when you want to just return the results of a table.
What if you want to construct the data set in the DO block? Okay, fine,
you could use a temp table, but what if you don't have rights to create
temporary tables?
> Still I don't like this idea, because you should to support DO
> RETURNING in other statements - like INSERT INTO DO RETURNING ???
That would certainly be neat, but it doesn't have to be there in the
first incarnation, or really, ever, if it turns out to be painful to do.
> What about local temporary functions ??
You can already create temporary functions by simply creating them in
pg_temp. I'd like to see us add explicit support for them though, but I
don't see this as related to the DO-RETURNING question.
Thanks,
Stephen
From | Date | Subject | |
---|---|---|---|
Next Message | Fred&Dani&Pandora&Aquiles | 2013-06-10 20:37:11 | Re: Parallell Optimizer |
Previous Message | Hannu Krosing | 2013-06-10 20:21:03 | Re: DO ... RETURNING |