4.1beta1: ANYARRAY disallowed for DOMAIN types which happen to be arrays

Поиск
Список
Период
Сортировка
От J. Greg Davidson
Тема 4.1beta1: ANYARRAY disallowed for DOMAIN types which happen to be arrays
Дата
Msg-id 1304979903.14349.86.camel@shevek.puuhonua.org
обсуждение исходный текст
Ответы Re: 4.1beta1: ANYARRAY disallowed for DOMAIN types which happen to be arrays
Re: 4.1beta1: ANYARRAY disallowed for DOMAIN types which happen to be arrays
Список pgsql-hackers
E.1.2.2. Casting            * Tighten casting checks for domains based on arrays (Tom Lane)               When a domain
isbased on an array type,..., such a domain type       is no longer allowed to match an anyarray parameter of a
polymorphicfunction, except by explicitly downcasting it to the       base array type.        
 
This will require me to add hundreds of casts to my code.  I do not get
how this will "Tighten casting checks".  It will certainly not tighten
my code!  Could you explain how it is good to not be able to do array
operations with a type which is an array?

BTW: All of my DOMAINs which are array types exist because of
PostgreSQL's inability to infer array types for DOMAINs, so I
have lots of code like this:

CREATE DOMAIN foo_ids AS integer;
CREATE DOMAIN foo_id_arrays AS integer[];

I would love to be able to simply use foo_ids[] instead of
having to have the second DOMAIN foo_id_arrays.

If there is some value which I'm missing in the above "Tighten"ing,
perhaps it could be put in *after* PostgreSQL were given the ability
to understand foo_ids[] as an array of foo_ids.

Thanks,

_Greg



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Inconsistent treatment of serials in pg_dump
Следующее
От: "J. Greg Davidson"
Дата:
Сообщение: Server Programming Interface underspecified in 4.1beta1