Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1atQoo-000727-HL for pgsql-general@arkaria.postgresql.org; Fri, 22 Apr 2016 02:27:42 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1atQoo-0006hk-2p for pgsql-general@arkaria.postgresql.org; Fri, 22 Apr 2016 02:27:42 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1atQmW-00044c-8l for pgsql-general@postgresql.org; Fri, 22 Apr 2016 02:25:20 +0000 Received: from adriana.opensysperu.com ([2607:5300:60:8392::1004]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1atQmS-0002vU-Qa for pgsql-general@postgresql.org; Fri, 22 Apr 2016 02:25:19 +0000 Received: from localhost (localhost [IPv6:::1]) by adriana.opensysperu.com (Postfix) with ESMTP id 294E56AE2; Thu, 21 Apr 2016 21:25:55 -0500 (PET) Received: from adriana.opensysperu.com ([IPv6:::1]) by localhost (adriana.opensysperu.com [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id su167u3cujbJ; Thu, 21 Apr 2016 21:25:54 -0500 (PET) Received: from localhost (localhost [IPv6:::1]) by adriana.opensysperu.com (Postfix) with ESMTP id 07E066AE3; Thu, 21 Apr 2016 21:25:54 -0500 (PET) X-Virus-Scanned: amavisd-new at opensysperu.com Received: from adriana.opensysperu.com ([IPv6:::1]) by localhost (adriana.opensysperu.com [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id ObolI8nfony7; Thu, 21 Apr 2016 21:25:53 -0500 (PET) Received: from adriana.opensysperu.com (adriana.opensysperu.com [158.69.30.115]) by adriana.opensysperu.com (Postfix) with ESMTP id D7DA76AE2; Thu, 21 Apr 2016 21:25:53 -0500 (PET) Date: Thu, 21 Apr 2016 21:25:53 -0500 (PET) Subject: Re: different empty array syntax requirements Message-ID: <57gu64mgblimccc593b7357u.1461291904081@email.android.com> From: Alvaro Aguayo Garcia-Rada To: Postgresql General , Scott Ribe MIME-Version: 1.0 In-Reply-To: References: Content-Type: multipart/alternative; boundary="----=_Part_135145_1655791420.1461291953550" X-Mailer: Zimbra 8.6.0_GA_1153 (MobileSync - SonyD6633/5.1.1-EAS-2.0) Thread-Topic: different empty array syntax requirements Thread-Index: Gq5+g1b3TqKiYHty5VWsfFoYT4RxIw== X-Pg-Spam-Score: -2.9 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org ------=_Part_135145_1655791420.1461291953550 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Looks like one has the appropiate cast operator, while the other hasn't. Ha= ve you tried doing the same, on both server, on an empty database created f= rom template0? Regards, Alvaro Aguayo Jefe de Operaciones Open Comb Systems E.I.R.L. Oficina: (+51-1)=C2=A03377813=C2=A0| RPM: #034252 / (+51)=C2=A0995540103=C2= =A0 | RPC: (+51)=C2=A0954183248 Website:=C2=A0www.ocs.pe Sent from my Sony Xperia=E2=84=A2 smartphone ---- Scott Ribe wrote ---- How is that one pgsql build (both are 9.5.2) has different casting behavior= for empty arrays: ericmj=3D# select ARRAY[]::text[]; array ------- {} (1 row) ericmj=3D# select (ARRAY[])::text[]; array ------- {} (1 row) --VS-- pedcard=3D# select ARRAY[]::text[]; array ------- {} (1 row) pedcard=3D# 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[]. --=20 Scott Ribe scott_ribe@elevated-dev.com http://www.elevated-dev.com/ https://www.linkedin.com/in/scottribe/ (303) 722-0567 voice --=20 Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general ------=_Part_135145_1655791420.1461291953550 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable

Looks like one has the appropiate cast oper= ator, 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)= 60;995540103  | RPC: (+51) 954183248
Website: www.ocs.pe

Sent from my Sony Xperia™ smartphone



---- Scott Ribe wrote ----


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


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

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


--VS--


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

pedcard=3D# 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[]::i= nteger[].

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







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