Re: PostgreSQL trigger how to detect a column value explicitely modified

2025-11-05 Thread PALAYRET Jacques
t of that ; it is an excellent idea (simple solution). I tested it ; it works as expected. Thanks to people who replied. Regards. - Mail original - De: "Laurenz Albe" À: "PALAYRET Jacques" , [email protected] Envoyé: Mardi 4 Novembre 2025 18:29:05 Objet:

Re: PostgreSQL trigger how to detect a column value explicitely modified

2025-11-04 Thread Laurenz Albe
On Tue, 2025-11-04 at 12:48 +, PALAYRET Jacques wrote: > In a trigger body, is there a simple way to know if a column value has been > explicitely modified ? > Explicitely modified ; in others words, typically indicated in the SET clause > of the UPDATE. > A simple way ; I mean without analys

Re: PostgreSQL trigger how to detect a column value explicitely modified

2025-11-04 Thread Tom Lane
PALAYRET Jacques writes: > In a trigger body, is there a simple way to know if a column value has been > explicitely modified ? > Explicitely modified ; in others words, typically indicated in the SET clause > of the UPDATE. I believe that an ON UPDATE trigger coded in C can access a bitmapse

Re: PostgreSQL trigger how to detect a column value explicitely modified

2025-11-04 Thread Dominique Devienne
On Tue, Nov 4, 2025 at 1:49 PM PALAYRET Jacques wrote: > In a trigger body, is there a simple way to know if a column value has been > explicitely modified ? Using pg_trigger_depth(), you can know whether the trigger is called from "outer SQL" directly, or from SQL done within another trigger (b