Re: autoupdating mtime column

From: "David Garamond" <davidgaramond(at)gmail(dot)com>
To: "Richard Huxton" <dev(at)archonet(dot)com>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-sql(at)postgresql(dot)org
Subject: Re: autoupdating mtime column
Date: 2006-08-05 01:27:52
Message-ID: 7c33d060608041827y8835d82q85772f56eced621f@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On 8/5/06, Richard Huxton <dev(at)archonet(dot)com> wrote:
>
> >> 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.
>
> I'd consider running the sync as a different (privileged) user and
> checking the current user in the trigger. Ordinary users always get
> now(), privileged users always get what they provide (and they are
> forced to provide some value). Does what you want and adds a safety
> catch too.
>
> Alternatively, you could do something similar with views.
>

That's a nice idea indeed. Thanks!

--
dave

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Lexington Luthor 2006-08-07 15:38:37 Querying constraints?
Previous Message Melvin Davidson 2006-08-04 21:23:20 to_dec()