Re: forcing a literal value in a column

From: Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>
To: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: forcing a literal value in a column
Date: 2003-05-13 14:45:32
Message-ID: 20030513164532.X564@hermes.hilbert.loc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom,

> The best way to achieve the effect you want is probably with a BEFORE
> INSERT OR UPDATE trigger that explicitly sets NEW.modify_when = now().
> Having done that, you don't need either the default or the check,
> because there is no way to override the trigger's action (except with
> another trigger).
Did so. Works. Thanks.

Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Karsten Hilbert 2003-05-13 15:01:03 Re: forcing a literal value in a column
Previous Message Skip Montanaro 2003-05-13 14:43:32 Broken upgrade_tips link