From: | Eric Ridge <ebr(at)tcdi(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "Mike Mascari" <mascarm(at)mascari(dot)com>, Jan Wieck <JanWieck(at)Yahoo(dot)com>, "Chris Travers" <chris(at)travelamericas(dot)com>, "NTPT" <ntpt(at)centrum(dot)cz>, "PostgreSQL-general" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Touch row ? |
Date: | 2004-01-24 21:19:23 |
Message-ID: | FB6F1D8E-4EB2-11D8-8446-000A95BB5944@tcdi.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-announce pgsql-general |
On Jan 24, 2004, at 3:58 PM, Tom Lane wrote:
> True. So if your goal is to force the timestamp column to be the
> correct value even when the user tries to set it to something else,
> you'd still have to use a trigger or rule.
Maybe the rule is that the computed value is always used, unless:
UPDATE foo OVERRIDE DEFAULTS set d=yesterday();
*shrug*. At least with something like the above, the user makes his
intention explicit. Perhaps if user doesn't specify OVERRIDE DEFAULTS,
postgres outputs a warning:
WARNING: value for column 'd' ignored.
HINT: Use UPDATE ... OVERRIDE DEFAULTS to override ON UPDATE DEFAULT
values
and of course, this would be handy too:
UPDATE foo OVERRIDE DEFAULTS set d=DEFAULT;
eric
From | Date | Subject | |
---|---|---|---|
Next Message | NTPT | 2004-01-25 01:09:02 | Re: Touch row ? |
Previous Message | Tom Lane | 2004-01-24 20:58:14 | Re: Touch row ? |
From | Date | Subject | |
---|---|---|---|
Next Message | Lee Harr | 2004-01-24 23:19:39 | Re: pl/pgsql docs 37.4.3. Row Types -- how do I use this function? |
Previous Message | Tom Lane | 2004-01-24 20:58:14 | Re: Touch row ? |