From: | Andrew Sullivan <ajs(at)crankycanuck(dot)ca> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: NULL becomes default |
Date: | 2006-08-21 10:27:17 |
Message-ID: | 20060821102717.GA7551@phlogiston.dyndns.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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(at)crankycanuck(dot)ca
"The year's penultimate month" is not in truth a good way of saying
November.
--H.W. Fowler
From | Date | Subject | |
---|---|---|---|
Next Message | Ezequias Rodrigues da Rocha | 2006-08-21 12:03:10 | Triggers |
Previous Message | Julian Scarfe | 2006-08-20 10:34:48 | Re: NULL becomes default |