Re: add column .. default

From: Rod Taylor <rbt(at)rbt(dot)ca>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: add column .. default
Date: 2003-06-19 13:23:00
Message-ID: 1055993491.23385.64.camel@jester
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)rbt(dot)ca>

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-06-19 13:38:49 Re: Two weeks to feature freeze
Previous Message Robert Treat 2003-06-19 13:22:12 Re: Two weeks to feature freeze