Is there a way to run heap_insert() AFTER ExecInsertIndexTuples() ?

Поиск
Список
Период
Сортировка
От Zoltan Boszormenyi
Тема Is there a way to run heap_insert() AFTER ExecInsertIndexTuples() ?
Дата
Msg-id 45E65E90.3070401@dunaweb.hu
обсуждение исходный текст
Ответы Re: Is there a way to run heap_insert() AFTER ExecInsertIndexTuples() ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

I would like to be able to harden the conditions
of generating IDENTITY columns so the
events below run in this order:

- assign values for regular columns (with or without DEFAULT)
- NOT NULL checks on regular columns
- CHECK constraints whose expression contains only regular columns

- assign values for GENERATED columns
- NOT NULL checks on GENERATED columns
- CHECK constraints whose expression may contain regular or GENERATED columns

- UNIQUE index checks that has only regular columns
- UNIQUE index checks that may have regular or GENERATED columns

- assign values for IDENTITY column
- NOT NULL on IDENTITY
- CHECK constraints on IDENTITY
- UNIQUE index checks that can reference IDENTITY column

At this point the heap tuple and the index tuple can be inserted
without further checks.

Currently tuple->t_self is required by ExecInsertIndexTuples()
and I don't see any way to make IDENTITY work the way it's
intended but to mix heap_insert()/heap_update() and
ExecInsertIndexTuples() together and use the result in
ExecInsert() and ExecUpdate().

Would it be acceptable?

Best regards,
Zoltán Böszörményi



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

Предыдущее
От: Galy Lee
Дата:
Сообщение: Re: Resumable vacuum proposal and design overview
Следующее
От: "Jonah H. Harris"
Дата:
Сообщение: Re: COMMIT NOWAIT Performance Option