Re: [GENERAL] different empty array syntax requirements

2016-04-22 Thread Scott Ribe
On Apr 21, 2016, at 8:37 PM, Tom Lane wrote: > > The parens turn into an actual parsetree node when > operator_precedence_warning is on, and the cast-of-an-array hack doesn't > know it should look through such a node. I figured that. The mystery is why on my pg, and not on the other. I've aske

Re: [GENERAL] different empty array syntax requirements

2016-04-22 Thread Scott Ribe
On Apr 21, 2016, at 8:25 PM, Alvaro Aguayo Garcia-Rada 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; CRE

Re: [GENERAL] different empty array syntax requirements

2016-04-21 Thread Tom Lane
Scott Ribe writes: > How is that one pgsql build (both are 9.5.2) has different casting behavior > for empty arrays: > pedcard=# select (ARRAY[])::text[]; > ERROR: cannot determine type of empty array > LINE 1: select (ARRAY[])::text[]; > ^ > HINT: Explicitly cast to the desired

Re: [GENERAL] different empty array syntax requirements

2016-04-21 Thread Alvaro Aguayo Garcia-Rada
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 

[GENERAL] different empty array syntax requirements

2016-04-21 Thread Scott Ribe
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) pedcar