Re: autoupdating mtime column
От
David Garamond
Тема
Re: autoupdating mtime column
Дата
Msg-id
7c33d060608040811s6dcaa3abia137188076a76781@mail.gmail.com
Ответ на
Re: autoupdating mtime column (Richard Huxton)
Список
Дерево обсуждения
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/4/06, Richard Huxton <dev@archonet.com> wrote:
--
dave
David Garamond wrote:
> Dear all,
>
> Please see SQL below. I'm already satisfied with everything except I
> wish in
> #4, mtime got automatically updated to NOW() if not explicitly SET in
> UPDATE
> statement. Is there a way to make the mtime column behave more like I
> wanted? Thanks in advance.
Just check for OLD.mtime = NEW.mtime, or am I missing something here?
How do I differentiate between:
UPDATE t SET mtime=mtime ...;
in which mtime is specifically set and should not change, and
UPDATE t SET foo=bar ...;
in which mtime is not mentioned and should be updated automagically to NOW().
UPDATE t SET mtime=mtime ...;
in which mtime is specifically set and should not change, and
UPDATE t SET foo=bar ...;
in which mtime is not mentioned and should be updated automagically to NOW().
--
dave
В списке pgsql-sql по дате отправления