[HACKERS] Arrays of domains

Поиск
Список
Период
Сортировка
От Tom Lane
Тема [HACKERS] Arrays of domains
Дата
Msg-id 9852.1499791473@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: [HACKERS] Arrays of domains  (David Fetter <david@fetter.org>)
Re: [HACKERS] Arrays of domains  (Andrew Dunstan <andrew.dunstan@2ndquadrant.com>)
Re: [HACKERS] Arrays of domains  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Over in
https://www.postgresql.org/message-id/877ezgyn60.fsf@metapensiero.it
there's a gripe about array_agg() not working for a domain type.
It fails because we don't create an array type over a domain type,
so the parser can't identify a suitable output type for the polymorphic
aggregate.

We could imagine tweaking the polymorphic-function resolution rules
so that a domain matched to ANYELEMENT is smashed to its base type,
allowing ANYARRAY to be resolved as the base type's array type.
While that would be a pretty localized fix, it seems like a kluge
to me.

Probably a better answer is to start supporting arrays over domain
types.  That was left unimplemented in the original domains patch,
but AFAICS not for any better reason than lack of round tuits.
I did find an argument here:
https://www.postgresql.org/message-id/3C98F7F6.29FE1248@redhat.com
that the SQL spec forbids domains over arrays, but that's the opposite
case (and a restriction we long since ignored, anyway).

Can anyone think of a reason not to pursue that?
        regards, tom lane



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

Предыдущее
От: Shubham Barai
Дата:
Сообщение: [HACKERS] GSoC 2017: weekly progress reports (week 6)
Следующее
От: Claudio Freire
Дата:
Сообщение: Fwd: [HACKERS] Vacuum: allow usage of more than 1GB of work mem