Re: Writeable CTEs and side effects

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: Writeable CTEs and side effects
Дата
Msg-id 1255030462.16369.119.camel@monkey-cat.sm.truviso.com
обсуждение исходный текст
Ответ на Re: Writeable CTEs and side effects  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Writeable CTEs and side effects  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
On Thu, 2009-10-08 at 15:11 -0400, Tom Lane wrote:
> > I'm not sure if this is a problem, but it seems like we're essentially
> > allowing a complex transaction to take place in one statement. Is that
> > what we want?
> 
> Yeah, I think that's more or less the point ...

I'm still trying to ponder the consequences of this. Most people assume
that a single statement means that everything in the statement happens
at once (intuitively). The few cases where that's not true are special
commands or things that we are trying to fix, like:
"UPDATE foo SET a = a + 1".

I get the feeling that we're turning a declarative statement into
something more procedural.

I suppose one difference between this and a BEGIN ... END block would be
that the isolation from other transactions would always be SERIALIZABLE.

I can't clearly articulate a problem with any of these things, but it
does seem vaguely troubling.

Also, are we missing out on an opportunity to provide some interesting
functionality if we do treat two DML statements as happening
simultaneously? I've read some interesting perspectives on this in the
past, and it's not trivial, but we might want to leave the possibility
open.

Regards,Jeff Davis



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Using results from INSERT ... RETURNING
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Using results from INSERT ... RETURNING