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