Re: VARIANT / ANYTYPE datatype

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: VARIANT / ANYTYPE datatype
Дата
Msg-id 21538.1305147962@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: VARIANT / ANYTYPE datatype  (Darren Duncan <darren@darrenduncan.net>)
Список pgsql-hackers
Darren Duncan <darren@darrenduncan.net> writes:
> But I'm just citing numeric as an example; there would be a lot more
> in practice, potentially one for every individual type, so for example
> if operators were defined for the open union rather than for the base
> type, then users/extensions could define their own types and easily
> declare "you can use it like this type" but its different in some
> important way, which may just be an implementation difference.
> Operations that don't care about the differences can just be written
> against the open union type where they just work and those that do
> care can be more specific.

I'm just an old-school abstract data type hacker, but I don't see
anything in what you're saying that doesn't work today in our existing
type system: with overloaded and/or polymorphic operators and functions
you can get all those effects.  Maybe there would be some small gain in
ability to share code for tasks that fall between single-data-type and
works-for-anything cases, but it looks like a pretty marginal
improvement from here; probably not worth the cost and compatibility
implications of a major overhaul of the type system.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Backpatching of "Teach the regular expression functions to do case-insensitive matching"
Следующее
От: "David E. Wheeler"
Дата:
Сообщение: Re: Extension Packaging