Re: autoupdating mtime column

Поиск
Список
Период
Сортировка
Искать
От
David Garamond
Тема
Re: autoupdating mtime column
Дата
Msg-id
7c33d060608041827y8835d82q85772f56eced621f@mail.gmail.com
Ответ на
Список
Дерево обсуждения
autoupdating mtime column "David Garamond" <davidgaramond@gmail.com>
Re: autoupdating mtime column Richard Huxton <dev@archonet.com>
Re: autoupdating mtime column "David Garamond" <davidgaramond@gmail.com>
Re: autoupdating mtime column Tom Lane <tgl@sss.pgh.pa.us>
Re: autoupdating mtime column "David Garamond" <davidgaramond@gmail.com>
Re: autoupdating mtime column Richard Huxton <dev@archonet.com>
Re: autoupdating mtime column "David Garamond" <davidgaramond@gmail.com>
Re: autoupdating mtime column "Rodrigo De León" <rdeleonp@gmail.com>
Re: autoupdating mtime column "David Garamond" <davidgaramond@gmail.com>
On 8/5/06, Richard Huxton <dev@archonet.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
В списке pgsql-sql по дате отправления
От: Richard Huxton
Дата:
Сообщение: Re: autoupdating mtime column
От: George Young
Дата:
FAQ