Re: different empty array syntax requirements

Поиск
Список
Период
Сортировка
От Alvaro Aguayo Garcia-Rada
Тема Re: different empty array syntax requirements
Дата
Msg-id 57gu64mgblimccc593b7357u.1461291904081@email.android.com
обсуждение исходный текст
Ответ на different empty array syntax requirements  (Scott Ribe <scott_ribe@elevated-dev.com>)
Ответы Re: different empty array syntax requirements  (Scott Ribe <scott_ribe@elevated-dev.com>)
Список pgsql-general

Looks like one has the appropiate cast operator, while the other hasn't. Have you tried doing the same, on both server, on an empty database created from template0?

Regards,

Alvaro Aguayo
Jefe de Operaciones
Open Comb Systems E.I.R.L.

Oficina: (+51-1) 3377813 | RPM: #034252 / (+51) 995540103  | RPC: (+51) 954183248
Website: www.ocs.pe

Sent from my Sony Xperia™ smartphone

---- Scott Ribe wrote ----


How is that one pgsql build (both are 9.5.2) has different casting behavior for empty arrays:


ericmj=# select ARRAY[]::text[];
array
-------
{}
(1 row)

ericmj=# select (ARRAY[])::text[];
array
-------
{}
(1 row)


--VS--


pedcard=# select ARRAY[]::text[];
array
-------
{}
(1 row)

pedcard=# select (ARRAY[])::text[];
ERROR:  cannot determine type of empty array
LINE 1: select (ARRAY[])::text[];
               ^
HINT:  Explicitly cast to the desired type, for example ARRAY[]::integer[].

--
Scott Ribe
scott_ribe@elevated-dev.com
http://www.elevated-dev.com/
https://www.linkedin.com/in/scottribe/
(303) 722-0567 voice







--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

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

Предыдущее
От: Scott Ribe
Дата:
Сообщение: different empty array syntax requirements
Следующее
От: Tom Lane
Дата:
Сообщение: Re: different empty array syntax requirements