Re: Does 'instead of delete' trigger support modification of OLD - Mailing list pgsql-hackers

From Eugen Konkov
Subject Re: Does 'instead of delete' trigger support modification of OLD
Date
Msg-id 1771593631.20191107112032@yandex.ru
Whole thread Raw
In response to Re: Does 'instead of delete' trigger support modification of OLD  (Bruce Momjian <bruce@momjian.us>)
Responses Re: Does 'instead of delete' trigger support modification of OLD  (Eugen Konkov <kes-kes@yandex.ru>)
Re: Does 'instead of delete' trigger support modification of OLD  (Eugen Konkov <kes-kes@yandex.ru>)
List pgsql-hackers
> I looked in the CREATE TRIGGER manual page and found this:

>         https://www.postgresql.org/docs/12/sql-createtrigger.html
>         If the trigger fires before or instead of the event, the trigger
>         can skip the operation for the current row, or change the row
>         being inserted (for INSERT and UPDATE operations only).

> I don't see the "(for INSERT and UPDATE operations only)" language in
> the main trigger documentation,
> https://www.postgresql.org/docs/current/trigger-definition.html.  I have
> written the attached patch to fix that.  Does that help?

No.   If   we document that PG does not allow to modify OLD at instead
of  trigger,  the  we can not implement that. Probably we can put note
that  "currently  modification of the trigger row for RETURNING is not
implemented"

> As far as allowing DELETE to modify the trigger row for RETURNING, I am
> not sure how much work it would take to allow that, but it seems like it
> is a valid requite, and if so, I can add it to the TODO list.

Yes,  Add please into TODO the feature to "allowing DELETE to modify the trigger row
for  RETURNING".  Becuase, as I have described at first letter, without
this the RETURNING rows **does not correspond actually deleted data**

Thank you.

-- 
Best regards,
Eugen Konkov




pgsql-hackers by date:

Previous
From: Julien Rouhaud
Date:
Subject: Re: Collation versioning
Next
From: Grigory Smolkin
Date:
Subject: Re: [proposal] recovery_target "latest"