On Tue, Apr 25, 2017 at 12:53 PM, Tom Lane wrote:
> Yeah. The core problem here is that the parser has to disambiguate the
> || operator: is it "anyarray || anyelement" or "anyarray || anyarray"?
>
<...>
> Peeking at the contents of the literal would make the behavior very
> unpredictable/da
"David G. Johnston" writes:
> On Tue, Apr 25, 2017 at 9:26 AM, Mike Blackwell
> wrote:
>> The docs (section 9.18 for PG 9.6) show as an example for array
>> concatenation
>> ARRAY[4,5,6] || 7
>> which works fine. However, trying the same with an array of text doesn't
>> work:
>> # select array['
On Tue, Apr 25, 2017 at 9:26 AM, Mike Blackwell
wrote:
> The docs (section 9.18 for PG 9.6) show as an example for array
> concatenation
>
> ARRAY[4,5,6] || 7
>
> which works fine. However, trying the same with an array of text doesn't
> work:
>
> # select array['a','b','c'] || 'd';
> ERROR: ma
The docs (section 9.18 for PG 9.6) show as an example for array
concatenation
ARRAY[4,5,6] || 7
which works fine. However, trying the same with an array of text doesn't
work:
# select array['a','b','c'] || 'd';
ERROR: malformed array literal: "d"
LINE 1: select array['a','b','c'] || 'd';