Re: autoupdating mtime column
От | David Garamond |
---|---|
Тема | Re: autoupdating mtime column |
Дата | |
Msg-id | 7c33d060608041036k59056658o5acd68df36d0bbb6@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: autoupdating mtime column (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: autoupdating mtime column
|
Список | pgsql-sql |
On 8/4/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Yeah, it's too expensive an overhead just for the sake of a slightly shorter UPDATE statement.
Syncing tables between databases (a la "rsync --times"). Btw, I'm considering temporarily disabling the update_times() trigger when sync-ing.
Thanks,
--
dave
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
В списке pgsql-sql по дате отправления: