On 8/4/06,
Tom Lane <
tgl@sss.pgh.pa.us> wrote:
If you are really intent on having a way to suppress the mtime update
you could dedicate an additional field to the purpose, eg
UPDATE t SET foo=..., bar=..., keepmtime = true ...
and in the trigger something like
if new.keepmtime then
new.keepmtime = false;
else
new.mtime = now();
As long as nothing else ever touches keepmtime this would work.
Personally I'm dubious that it's worth the trouble
Yeah, it's too expensive an overhead just for the sake of a slightly shorter UPDATE statement.
--- do you
have a real use-case for suppressing mtime updates?
Syncing tables between databases (a la "rsync --times"). Btw, I'm considering temporarily disabling the update_times() trigger when sync-ing.
Thanks,
--
dave