[GENERAL] ALTER COLUMN, trading a DOMAIN for its base datatype - Mailing list pgsql-general

From C GG
Subject [GENERAL] ALTER COLUMN, trading a DOMAIN for its base datatype
Date
Msg-id CAJXW-z87Mc9RHrpnOGeVB=tAoEVgoxrbTfe_LHZkxT7-gd=OTA@mail.gmail.com
Whole thread Raw
Responses Re: [GENERAL] ALTER COLUMN, trading a DOMAIN for its base datatype  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
I'm (still) trying to transition out from under the uniqueidentifier contrib module to the native uuid datatype. I seem to be able to create a domain for uniqueidentifier:

CREATE DOMAIN public.uniqueidentifier AS uuid;

and then use pg_restore to reload my data without the contrib module.

I'd like for my final step to be to 

ALTER TABLE foo ALTER COLUMN my_uuid TYPE uuid;

... Is PostgreSQL smart enough to not have to rewrite the table and simply shed the domain for the underlying datatype?

pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: [GENERAL] ~/.psqlrc file is ignored
Next
From: Tom Lane
Date:
Subject: Re: [GENERAL] ALTER COLUMN, trading a DOMAIN for its base datatype