Re: BUG #3320: Error when using INSERT...RETURNING as a subquery

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: BUG #3320: Error when using INSERT...RETURNING as a subquery
Дата
Msg-id 1180544432.26915.116.camel@dogma.v10.wvs
обсуждение исходный текст
Ответ на Re: BUG #3320: Error when using INSERT...RETURNING as a subquery  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On Tue, 2007-05-29 at 22:41 -0400, Tom Lane wrote:
> Jeff Davis <pgsql@j-davis.com> writes:
> > On Tue, 2007-05-29 at 18:10 +0100, Gregory Stark wrote:
> >> It has the same problem that SELECT triggers have. How many rows should you
> >> expect that subquery to insert, update, or delete if it's used in a join
> >> clause? Or in the where clause of another insert/update/delete statement?
>
> > We could handle it essentially like a volatile set-returning function.
>
> Uh-huh.  Please provide a concise, accurate definition of what that
> does.  For extra points, be sure it describes the behavior of all recent
> Postgres versions.  (And after that, we could argue about whether we
> actually *like* the described behavior ... which I'll bet we won't.)
>

I understand that we don't make many guarantees about when and how many
times volatile functions are executed (the most obvious example is the
WHERE clause).

I also understand the argument that we don't want to extend that
uncertainty to UPDATE ... RETURNING.

It is possible to define behavior though, because it's already done for
volatile functions. Even if it's not a good definition, and even if that
definition changes between versions and is non-deterministic, it seems
like it offers some kind of starting place.

Regards,
    Jeff Davis

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #3319: Superuser can't revoke grants on a schema given by aother user
Следующее
От: Pedro Gimeno Fortea
Дата:
Сообщение: Re: BUG #3319: Superuser can't revoke grants on a schema given by aother user