Re: Casting issues with domains - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: Casting issues with domains
Date
Msg-id 54861B72.9050804@BlueTreble.com
Whole thread Raw
In response to Re: Casting issues with domains  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 12/8/14, 9:18 AM, Tom Lane wrote:
> The short answer is that SQL domains are not zero-cost type aliases.
> Perhaps there would be value in having a feature that*is*  a a zero-cost
> alias, but it wouldn't be a domain.

Note that you can actually re-use the support functions of one data type to create a new one. So if you wanted a
specialtype called "document" that actually behaved the same as text you could do that fairly easily (though not as
easilyas creating a domain).
 

If we were going to expend energy here, I suspect it would be more useful to look at ways of creating new types without
requiringC. C isn't an option on many (even most) environments in today's "cloud" world, aside from the intimidation
factor.There are comments in the code that hypothesize about making cstring a full type; that might be all that's
needed.
-- 
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com



pgsql-hackers by date:

Previous
From: Jim Nasby
Date:
Subject: Re: Proposal: Log inability to lock pages during vacuum
Next
From: Michael Paquier
Date:
Subject: Re: Compression of full-page-writes