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 15:01:03
Message-ID: 20030513170103.Z564@hermes.hilbert.loc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> in my audited tables I do this:
> modify_when time stamp with time zone not null default CURRENT_TIMESTAMP check(modify_when=now()),
>
> This works on insert. However, on update a function runs
> via a trigger but fails with:
> ExecReplace: rejected due to CHECK constraint audit_mark_modify_when

> Any help is appreciated. This is on 7.1.3 (I know that's
> rather old).
Never mind since it's still the old mistake with the check
constraint.

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 Bruno Wolff III 2003-05-13 15:15:04 Re: Creating functions and triggers
Previous Message Karsten Hilbert 2003-05-13 14:45:32 Re: forcing a literal value in a column