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

From Christopher Kings-Lynne
Subject Re: add column .. default
Date
Msg-id 003d01c336ca$6f630580$2800a8c0@mars
Whole thread Raw
In response to add column .. default  (Rod Taylor <rbt@rbt.ca>)
Responses Re: add column .. default
List pgsql-hackers
> There is no alternative, unless you want the command to be
> non-roll-back-able.

Well, you can do a cluster-type table duplication...

> > 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.

And check domain constraints...?

Chris



pgsql-hackers by date:

Previous
From: The Hermit Hacker
Date:
Subject: Re: Two weeks to feature freeze
Next
From: "Christopher Kings-Lynne"
Date:
Subject: Re: src/bin/scripts seems a bit of a misnomer now