Re: alter table alter columns vs. domains - Mailing list pgsql-hackers

From Rod Taylor
Subject Re: alter table alter columns vs. domains
Date
Msg-id 1083865438.91282.26.camel@jester
Whole thread Raw
In response to Re: alter table alter columns vs. domains  ("Merlin Moncure" <merlin.moncure@rcsonline.com>)
Responses Re: alter table alter columns vs. domains
List pgsql-hackers
On Thu, 2004-05-06 at 13:23, Merlin Moncure wrote:
> > Yes. This is something I was going to look at doing in the next
> release.
> 
> Quick question: 
> With your potential changes, you would then be able to alter a domain
> that is involved in RI constraints between 2 or more tables without
> bringing down the constraints, yes?  This would be great :)

I had been hoping to get away without actually rechecking foreign key
constraints, as that makes it significantly more complicated -- but if
you set the value to NULL then problems could arise (otherwise fkeys
would still match so long as UNIQUE wasn't violated).

We would need to apply phases 1 to 3 on all of the tables and move
foreign key checks to a phase 4 (intertable work phase?)


In the mean time, you can create a new domain then modify the type of
all the tables.



pgsql-hackers by date:

Previous
From: "Merlin Moncure"
Date:
Subject: Re: alter table alter columns vs. domains
Next
From: Andreas Pflug
Date:
Subject: Re: alter table alter columns vs. domains