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,
> but it only gets exercised in cases involving inheritance.

Just a clarification: isn't ALTER DOMAIN the best place to do this?

IMHO, this is one of those rare cases were extending PostgreSQL beyond
the SQL spec is justified.  Right now, as I understand it, the only way
to do these types of things is to bring down the RI rules for a short
time until the table manipulation is completed, which seems inelegant,
not to mention the convenience factor.

Plus, I see anything that encourages usage of domains as good thing, as
domains themselves are very good things (and quite underutilized by the
unwashed masses, I expect).

Merlin

Thu, 6 May 2004 14:54:22 -0400
"Merlin Moncure" <merlin.moncure@rcsonline.com>
Re: alter table alter columns vs. domains 
"Merlin Moncure" <merlin.moncure@rcsonline.com> 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 the best place to do this?

It's one way to do it, but not necessarily the only way.

A person who's needing to change their column datatypes has likely not
had the foresight to use domains either, so I don't feel entirely secure
saying that ALTER DOMAIN would solve all problems in this line.

			regards, tom lane

Thu, 06 May 2004 15:02:06 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: alter table alter columns vs. domains 