Re: different empty array syntax requirements

From: Scott Ribe <scott_ribe(at)elevated-dev(dot)com>
To: Alvaro Aguayo Garcia-Rada <aaguayo(at)opensysperu(dot)com>
Cc: Postgresql General <pgsql-general(at)postgresql(dot)org>
Subject: Re: different empty array syntax requirements
Date: 2016-04-22 11:13:13
Message-ID: E00603DA-D7BC-4019-A8E7-D7BE843CEFD0@elevated-dev.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Apr 21, 2016, at 8:25 PM, Alvaro Aguayo Garcia-Rada <aaguayo(at)opensysperu(dot)com> 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(at)elevated-dev(dot)com
http://www.elevated-dev.com/
https://www.linkedin.com/in/scottribe/
(303) 722-0567 voice

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scott Ribe 2016-04-22 11:21:04 Re: different empty array syntax requirements
Previous Message Alex Ignatov 2016-04-22 10:35:50 Re: Initdb --data-checksums by default