different empty array syntax requirements

Поиск
Список
Период
Сортировка
От Scott Ribe
Тема different empty array syntax requirements
Дата
Msg-id ED37E303-1B0A-4CD8-8E1E-B9C4C2DD9A17@elevated-dev.com
обсуждение исходный текст
Ответы Re: different empty array syntax requirements  (Alvaro Aguayo Garcia-Rada <aaguayo@opensysperu.com>)
Re: different empty array syntax requirements  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
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







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

Предыдущее
От:
Дата:
Сообщение: Re: Is it possible to call Postgres directly?
Следующее
От: Alvaro Aguayo Garcia-Rada
Дата:
Сообщение: Re: different empty array syntax requirements