Re: DO ... RETURNING

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: DO ... RETURNING
Дата
Msg-id CAFj8pRAG5mLvo_yWw10gJ=QOKkDfj4d0iuTWraXwK1Gw1b6SXw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: DO ... RETURNING  (Stephen Frost <sfrost@snowman.net>)
Ответы Re: DO ... RETURNING  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-hackers
2013/6/10 Stephen Frost <sfrost@snowman.net>:
> * Pavel Stehule (pavel.stehule@gmail.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?

1. DO as function
2. DO as batch

>
>> 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.
>

this is reason, why I dislike it - It is introduce significant strange
SQL extension

>> 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.

I don't think we have to introduce a new NON ANSI concept, when is
possible using current feature.

so for me -1

Pavel

>
>         Thanks,
>
>                 Stephen



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Noah Misch
Дата:
Сообщение: Re: JSON and unicode surrogate pairs
Следующее
От: Tatsuo Ishii
Дата:
Сообщение: gitmaster.postgresql.org down?