Re: EvalPlanQual seems a tad broken

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: EvalPlanQual seems a tad broken
Дата
Msg-id 4990.1255375744@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: EvalPlanQual seems a tad broken  (Simon Riggs <simon@2ndQuadrant.com>)
Список pgsql-hackers
Simon Riggs <simon@2ndQuadrant.com> writes:
> On Mon, 2009-10-12 at 11:42 -0400, Tom Lane wrote:
>> The problem is that execMain.c is set up to pull as many rows as it can
>> from execution of an EvalPlanQual query.  Then, once that's exhausted,
>> it steps to the next result from the original query.  So if a row that
>> requires locking joins to more than one row in some other table, you
>> get duplicated output rows.

> Surely the SQL Standard recognises such queries as failing test 23b) on
> 7.12 <query specification> (p379, SQL2008 Foundation). So the query is
> not potentially updateable and should give a runtime error using a FOR
> UPDATE.

You're confusing our implementation of FOR UPDATE with the spec.
As I said earlier, they are only very loosely related.  In particular,
our reading of FOR UPDATE is to lock the referenced rows, not to enforce
that they are referenced only once.
        regards, tom lane


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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: EvalPlanQual seems a tad broken
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: CREATE LIKE INCLUDING COMMENTS and STORAGES