Re: FOR EACH ROW triggers, on partitioend tables, with indexes?

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: FOR EACH ROW triggers, on partitioend tables, with indexes?
Дата
Msg-id 20220901085813.jaukr2hyckxm5zkn@alvherre.pgsql
обсуждение исходный текст
Ответ на FOR EACH ROW triggers, on partitioend tables, with indexes?  (Justin Pryzby <pryzby@telsasoft.com>)
Ответы Re: FOR EACH ROW triggers, on partitioend tables, with indexes?
Список pgsql-hackers
On 2022-Aug-19, Justin Pryzby wrote:

> That would be a memory leak or some other bug, except that it also seems to be
> dead code ?
> 
> https://coverage.postgresql.org/src/backend/commands/trigger.c.gcov.html#1166
> 
> Is it somwhow possible to call CreateTrigger() to create a FOR EACH ROW
> trigger, with an index, and not internally ?

TBH I don't remember this at all anymore.

So apparently the way to get a trigger associated with a relation
(tgconstrrelid) is via CREATE CONSTRAINT TRIGGER, but there doesn't
appear to be a way to have it associated with a specific *index* on that
relation (tgconstrindid).  So you're right that it appears to be dead
code.

If the regression tests don't break by removing it, I agree with doing
that.

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/
"La libertad es como el dinero; el que no la sabe emplear la pierde" (Alvarez)



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

Предыдущее
От: Dave Page
Дата:
Сообщение: Re: Tracking last scan time
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Solaris "sed" versus pre-v13 plpython tests