Re: [HACKERS] alter table alter columns vs. domains

2004-05-19 Thread Bruce Momjian
Added to TODO: o Add ALTER DOMAIN TYPE --- Rod Taylor wrote: > > > Is it feasible or practical to consider adding ALTER DOMAIN TYPE type? > > > (basically following the same rules as ALTER TABLE). > > > > Intere

Re: [HACKERS] alter table alter columns vs. domains

2004-05-06 Thread Christopher Kings-Lynne
Is it feasible or practical to consider adding ALTER DOMAIN TYPE type? (basically following the same rules as ALTER TABLE). I was _just_ about to ask that! Chris ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index

Re: [HACKERS] alter table alter columns vs. domains

2004-05-06 Thread Tom Lane
"Merlin Moncure" <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> If we were willing to abuse the ALTER TABLE syntax some more, it would >> be possible to support changing the datatypes of f1 and f2 >> simultaneously, thereby allowing the above to work. > Just a clarification: isn't ALTER DOMAIN t

Re: [HACKERS] alter table alter columns vs. domains

2004-05-06 Thread Rod Taylor
> If we were willing to abuse the ALTER TABLE syntax some more, it would > be possible to support changing the datatypes of f1 and f2 > simultaneously, thereby allowing the above to work. The infrastructure > for hacking multiple tables in parallel is already there in CVS tip, > but it only gets e

Re: [HACKERS] alter table alter columns vs. domains

2004-05-06 Thread Merlin Moncure
Tom Lane wrote: > If we were willing to abuse the ALTER TABLE syntax some more, it would > be possible to support changing the datatypes of f1 and f2 > simultaneously, thereby allowing the above to work. The infrastructure > for hacking multiple tables in parallel is already there in CVS tip, > bu

Re: [HACKERS] alter table alter columns vs. domains

2004-05-06 Thread Tom Lane
Rod Taylor <[EMAIL PROTECTED]> writes: >> 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 rec

Re: [HACKERS] alter table alter columns vs. domains

2004-05-06 Thread Andreas Pflug
Bruce Momjian wrote: Merlin Moncure wrote: Is it feasible or practical to consider adding ALTER DOMAIN TYPE type? (basically following the same rules as ALTER TABLE). I don't mind bringing down all the views before I do this, it would be just great if you could change domains from a centraliz

Re: [HACKERS] alter table alter columns vs. domains

2004-05-06 Thread Merlin Moncure
> 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 :) Merlin

Re: [HACKERS] alter table alter columns vs. domains

2004-05-06 Thread Rod Taylor
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 > bri

Re: [HACKERS] alter table alter columns vs. domains

2004-05-06 Thread Rod Taylor
> > Is it feasible or practical to consider adding ALTER DOMAIN TYPE type? > > (basically following the same rules as ALTER TABLE). > > Interesting --- you would have to rebuild every table that uses the > domain, and map from-to for all stored values of the domain. > > TODO item? Yes. This i

Re: [HACKERS] alter table alter columns vs. domains

2004-05-06 Thread Bruce Momjian
Merlin Moncure wrote: > Is it feasible or practical to consider adding ALTER DOMAIN TYPE type? > (basically following the same rules as ALTER TABLE). > > I don't mind bringing down all the views before I do this, it would be > just great if you could change domains from a centralized location. >