From: | "David Garamond" <davidgaramond(at)gmail(dot)com> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: autoupdating mtime column |
Date: | 2006-08-04 17:36:42 |
Message-ID: | 7c33d060608041036k59056658o5acd68df36d0bbb6@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On 8/4/06, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Huxton | 2006-08-04 18:18:50 | Re: autoupdating mtime column |
Previous Message | Tom Lane | 2006-08-04 16:10:23 | Re: autoupdating mtime column |