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

From Rod Taylor
Subject Re: add column .. default
Date
Msg-id 1055993491.23385.64.camel@jester
Whole thread Raw
In response to Re: add column .. default  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: add column .. default  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: add column .. default  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
> > Someone can
> > make it more efficient in regards to constraint checks, etc. in the
> > future if they want -- I don't intend to.
>
> It'd be nice if you at least ensure that all the constraints are checked
> in a single pass over the table (not one per constraint).  Right offhand
> I do not see why they couldn't be checked in the same pass that does the
> UPDATE.  For extra credit, detect that the default expression is
> immutable or stable, and do the checks *once* not once per row.

I suppose that can be done.  It will take a significant reorganization
of the ALTER TABLE functions (or lots of duplicated code), but shouldn't
be that time consuming.

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.

--
Rod Taylor <rbt@rbt.ca>

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

pgsql-hackers by date:

Previous
From: Robert Treat
Date:
Subject: Re: Two weeks to feature freeze
Next
From: Tom Lane
Date:
Subject: Re: Two weeks to feature freeze