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

From Merlin Moncure
Subject Re: alter table alter columns vs. domains
Date
Msg-id 6EE64EF3AB31D5448D0007DD34EEB34101AE0C@Herge.rcsinc.local
Whole thread Raw
In response to alter table alter columns vs. domains  ("Merlin Moncure" <merlin.moncure@rcsonline.com>)
Responses Re: alter table alter columns vs. domains
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: sdv mailer
Date:
Subject: Re: PostgreSQL pre-fork speedup
Next
From: Robert Treat
Date:
Subject: Re: ALTER TABLE TODO items