From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | Justin Pryzby <pryzby(at)telsasoft(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org, Tomas Vondra <tomas(dot)vondra(at)postgresql(dot)org>, Peter Smith <smithpb2250(at)gmail(dot)com>, David Rowley <dgrowleyml(at)gmail(dot)com> |
Subject: | Re: FOR EACH ROW triggers, on partitioend tables, with indexes? |
Date: | 2022-09-01 08:58:13 |
Message-ID: | 20220901085813.jaukr2hyckxm5zkn@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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)
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2022-09-01 09:10:35 | Re: Solaris "sed" versus pre-v13 plpython tests |
Previous Message | Dave Page | 2022-09-01 08:46:59 | Re: Tracking last scan time |