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? Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: FOR EACH ROW triggers, on partitioend tables, with indexes? David Rowley <dgrowleyml@gmail.com>
Re: FOR EACH ROW triggers, on partitioend tables, with indexes? David Rowley <dgrowleyml@gmail.com>
Re: FOR EACH ROW triggers, on partitioend tables, with indexes? Justin Pryzby <pryzby@telsasoft.com>
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
Дата:
FAQ