Re: add column .. default - Mailing list pgsql-hackers

From Rod Taylor
Subject Re: add column .. default
Date
Msg-id 1056030733.39060.10.camel@jester
Whole thread Raw
In response to Re: add column .. default  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: add column .. default
Re: add column .. default
List pgsql-hackers
On Thu, 2003-06-19 at 09:40, Tom Lane wrote:
> Rod Taylor <rbt@rbt.ca> writes:
> > Anyway, I suppose you have indirectly confirmed that user triggers, etc.
> > should NOT fire on for the data update.  I didn't see anything in the
> > spec that said one way or the other.
>
> Actually, I didn't mean to take a position one way or the other.  You
> could certainly argue that they should fire ...

Do we want them to?  If we don't mind them being executed, it is far
easier to:

- alter table structure
- Add all new constraints (without confirming their correctness at that
time)
- update table contents via an SPI call to UPDATE WHERE <column> IS NULL

The where clause would avoid issues with inherited data being
overwritten when the child tables are updated.

--
Rod Taylor <rbt@rbt.ca>

PGP Key: http://www.rbt.ca/rbtpub.asc

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: add column .. default
Next
From: Peter Eisentraut
Date:
Subject: Re: add column .. default