Re: [BUGS] Deferrable constraint execution not respecting "initially immediate"?

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: [BUGS] Deferrable constraint execution not respecting "initially immediate"?
Дата
Msg-id CAKFQuwb8oHS1zfdGOqYaWzrXAmduS-5zJ_iYbo54m3pEubpo1A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [BUGS] Deferrable constraint execution not respecting "initially immediate"?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On Mon, Jul 10, 2017 at 10:25 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> From "CREATE TABLE":
> "A constraint that is not deferrable will be checked immediately after
> every command."

> I think the above should be "after every row" instead of "after every
> command".

I believe that FK constraints work differently from indexes in this
regard.  Not sure that we want to get into that level of detail here.

​Since three of the 4 types are done "after every row" if we want to simplify (I'm leaning toward being precise here) I'd rather be imprecise about the FK.​  Pretending that a FK change is checked sooner than it really is seems like a minor omission since the observed behavior isn't likely to be noticeable.  Wondering why "update pk = pk + 1" doesn't work by default when PK constraints are checked "after every command" has been shown to be noticeable.

David J.

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

Предыдущее
От: Bruno Richard
Дата:
Сообщение: Re: [BUGS] PostgreSQL hot standby Hangs due to AccessExclusiveLock onpg_attribute or pg_type tables
Следующее
От: 张明富
Дата:
Сообщение: [BUGS] an error "duplicate key value violates unique constraint ..." happend when update table