pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Aguayo Garcia-Rada <aaguayo@opensysperu.com>
To: Postgresql General <pgsql-general@postgresql.org>
To: Scott Ribe <scott_ribe@elevated-dev.com>
Subject: Re: different empty array syntax requirements
Date: Thu, 21 Apr 2016 21:25:53 -0500 (PET)
Message-ID: <57gu64mgblimccc593b7357u.1461291904081@email.android.com> (raw)
In-Reply-To: <ED37E303-1B0A-4CD8-8E1E-B9C4C2DD9A17@elevated-dev.com>
References: <ED37E303-1B0A-4CD8-8E1E-B9C4C2DD9A17@elevated-dev.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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

view thread (5+ messages)  latest in thread

Message-ID: <57gu64mgblimccc593b7357u.1461291904081@email.android.com>
Permalink:  ../57gu64mgblimccc593b7357u.1461291904081@email.android.com/
Also on:    postgresql.org/message-id/57gu64mgblimccc593b7357u.1461291904081@email.android.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: aaguayo@opensysperu.com, scott_ribe@elevated-dev.com
  Subject: Re: different empty array syntax requirements
  In-Reply-To: <57gu64mgblimccc593b7357u.1461291904081@email.android.com>
  References: <ED37E303-1B0A-4CD8-8E1E-B9C4C2DD9A17@elevated-dev.com> <57gu64mgblimccc593b7357u.1461291904081@email.android.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox