From: Andrew Sullivan <ajs@crankycanuck.ca>
To: pgsql-sql@postgresql.org
Subject: Re: NULL becomes default
Date: Mon, 21 Aug 2006 06:27:17 -0400
Message-ID: <20060821102717.GA7551@phlogiston.dyndns.org> (raw)
In-Reply-To: <0cb101c6c444$44867300$0600a8c0@Wilbur>
References: <029c01c6c228$8e8e5210$0600a8c0@Wilbur>
<44E6C30D.1070608@logix-tt.com>
<0cb101c6c444$44867300$0600a8c0@Wilbur>
On Sun, Aug 20, 2006 at 11:34:48AM +0100, Julian Scarfe wrote:
> So thinking about this a little more, it requires me to be able to change a
> column value to DEFAULT (unless I implement the default from scratch in the
> trigger, but that feels messy). I don't have much experience of triggers:
> can I do that?
DEFAULT won't work for this case, I don't think; you want to set it
to the nextval() of the sequence or whatever it was you were trying
to do. But it's not messy: this is precisely the sort of thing
BEFORE triggers are good at.
A
--
Andrew Sullivan | ajs@crankycanuck.ca
"The year's penultimate month" is not in truth a good way of saying
November.
--H.W. Fowler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: ajs@crankycanuck.ca
Subject: Re: NULL becomes default
In-Reply-To: <20060821102717.GA7551@phlogiston.dyndns.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox