Re: Does 'instead of delete' trigger support modification of OLD
От | Eugen Konkov |
---|---|
Тема | Re: Does 'instead of delete' trigger support modification of OLD |
Дата | |
Msg-id | 471116573.20191204133757@yandex.ru обсуждение исходный текст |
Ответ на | Re: Does 'instead of delete' trigger support modification of OLD (Bruce Momjian <bruce@momjian.us>) |
Ответы |
Re: Does 'instead of delete' trigger support modification of OLD
Re: Does 'instead of delete' trigger support modification of OLD |
Список | pgsql-hackers |
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
В списке pgsql-hackers по дате отправления: