Re: autoupdating mtime column

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: autoupdating mtime column
Дата
Msg-id 44D38F8A.8040302@archonet.com
обсуждение исходный текст
Ответ на Re: autoupdating mtime column  ("David Garamond" <davidgaramond@gmail.com>)
Ответы Re: autoupdating mtime column  ("David Garamond" <davidgaramond@gmail.com>)
Список pgsql-sql
David Garamond wrote:
> On 8/4/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> --- 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.

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.

--   Richard Huxton  Archonet Ltd


В списке pgsql-sql по дате отправления:

Предыдущее
От: "David Garamond"
Дата:
Сообщение: Re: autoupdating mtime column
Следующее
От: "David Garamond"
Дата:
Сообщение: Re: autoupdating mtime column