From: David Garamond <davidgaramond@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-sql@postgresql.org
Subject: Re: autoupdating mtime column
Date: Sat, 5 Aug 2006 00:36:42 +0700
Message-ID: <7c33d060608041036k59056658o5acd68df36d0bbb6@mail.gmail.com> (raw)
In-Reply-To: <29505.1154707823@sss.pgh.pa.us>
References: <7c33d060608040516n799af906sf74e1c645a47caff@mail.gmail.com>
<44D34242.6000901@archonet.com>
<7c33d060608040811s6dcaa3abia137188076a76781@mail.gmail.com>
<29505.1154707823@sss.pgh.pa.us>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: davidgaramond@gmail.com, tgl@sss.pgh.pa.us
Subject: Re: autoupdating mtime column
In-Reply-To: <7c33d060608041036k59056658o5acd68df36d0bbb6@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox