Re: Array dimension lost if dimension length is zero - Mailing list pgsql-bugs

From Shay Rojansky
Subject Re: Array dimension lost if dimension length is zero
Date
Msg-id CADT4RqByUyKzcsj6QSODNE7OaH2wwkEKK7h18wxGtNKgP4=r=Q@mail.gmail.com
Whole thread Raw
In response to Re: Array dimension lost if dimension length is zero  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Responses Re: Array dimension lost if dimension length is zero  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Apologies, I misinterpreted the results.

I still think it may make sense to change this behavior in a major version
release, although I don't know what the PostgreSQL policy is on such
breakage.

On Fri, Sep 9, 2016 at 7:13 AM, Andrew Gierth <andrew@tao11.riddles.org.uk>
wrote:

> >>>>> "Shay" == Shay Rojansky <roji@roji.org> writes:
>
>  >> This is intentional: all empty arrays are alike, with zero
>  >> dimensions (not one dimension, but none).
>
>  Shay> Also, note that when reading an empty array in binary encoding,
>  Shay> the dimension field contains one.
>
> Nope:
>
> postgres=# select array_send('{}'::integer[]);
>          array_send
> ----------------------------
>  \x000000000000000000000017
>
> (that's ndim=00000000, flags=00000000, element_oid=00000017)
>
> --
> Andrew (irc:RhodiumToad)
>

pgsql-bugs by date:

Previous
From: Xtra Coder
Date:
Subject: Performance issue: jsonb_object_agg() is twice slower than to_jsonb()
Next
From: andreas.papst@univie.ac.at
Date:
Subject: BUG #14320: systemd terminates postgresql hot standby instance 90 seconds after start