Re: Casting issues with domains

Поиск
Список
Период
Сортировка
От Jim Nasby
Тема Re: Casting issues with domains
Дата
Msg-id 54861B72.9050804@BlueTreble.com
обсуждение исходный текст
Ответ на Re: Casting issues with domains  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Jim Nasby
Дата:
Сообщение: Re: Proposal: Log inability to lock pages during vacuum
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Compression of full-page-writes