public inbox for [email protected]
help / color / mirror / Atom feedFrom: Eugen Konkov <[email protected]>
To: Bruce Momjian <[email protected]>
Cc: PostgreSQL-development <[email protected]>
Cc: [email protected]
Subject: Re: Does 'instead of delete' trigger support modification of OLD
Date: Wed, 4 Dec 2019 13:37:57 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
Hi again.
> Thinking some more on this, I now don't think a TODO makes sense, so I
> have removed it.
Please look into this example: https://dbfiddle.uk/?rdbms=postgres_12&fiddle=95ed9fab6870d7c4b6266ea4d93def13
This is real life code from our production.
You can see that this is important to get correct info about deleted
data
-- EXPECTED app_period: ["2018-08-20", "2018-08-25")
-- ACTUAL app_period: ["2018-08-14", )
> Triggers are designed to check and modify input data, and since DELETE
> has no input data, it makes no sense.
Please put back into TODO list this feature request to allow
triggers to modify output data.
INPUT -- receives data OK (behavior is expected)
UPDATE -- receives and returns data OK (behavior is expected)
DELETE -- returns data FAIL (behavior is not expected)
This is inconsistent to allow modify output data for UPDATE and
restrict to do this for DELETE
Thank you
--
Best regards,
Eugen Konkov
view thread (13+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: Does 'instead of delete' trigger support modification of OLD
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox