From: | <david(dot)sahagian(at)emc(dot)com> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org> |
Subject: | TG_COLUMNS_UPDATED |
Date: | 2012-07-03 18:31:46 |
Message-ID: | F3CBFBA88397EA498B22A05FFA9EC49D8CE25462@MX22A.corp.emc.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I would like another TG_* special variable to be available to a PL/pgSQL trigger-function.
TG_COLUMNS_UPDATED
Its value would be NULL unless: TG_OP == ' UPDATE' and TG_LEVEL == 'ROW'
Data type == varbit
One bit for each column of the table that the trigger is created on.
1 means that the column was in the set clause of the update statement that made the trigger fire
0 means it was not
I understand that CREATE TRIGGER already has
UPDATE [ OF column_name [, ... ] ]
Is this a relatively straightforward enhancement ?
It would allow me to know whether various timestamp columns in the row were
unlucky enough to have been set to the same exact value already existing in the table
*versus* were simply not set by the UPDATE statement.
Thanks,
-dvs-
From | Date | Subject | |
---|---|---|---|
Next Message | Bartosz Dmytrak | 2012-07-03 21:47:12 | Re: TG_COLUMNS_UPDATED |
Previous Message | Benedict Holland | 2012-07-03 18:15:00 | Re: function ave(integer) does not exist |