Search Postgresql Archives

Re: different empty array syntax requirements

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Apr 21, 2016, at 8:25 PM, Alvaro Aguayo Garcia-Rada <aaguayo@xxxxxxxxxxxxxxx> wrote:
> 
> 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?

Excellent suggestion:

pedcard=# create database test;
CREATE DATABASE
pedcard=# \c test
SSL connection (protocol: TLSv1, cipher: DHE-RSA-AES256-SHA, bits: 256, compression: off)
You are now connected to database "test" as user "admin".
test=# 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@xxxxxxxxxxxxxxxx
http://www.elevated-dev.com/
https://www.linkedin.com/in/scottribe/
(303) 722-0567 voice







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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux