Re: Array dimension lost if dimension length is zero

From: Shay Rojansky <roji(at)roji(dot)org>
To: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Array dimension lost if dimension length is zero
Date: 2016-09-09 09:09:30
Message-ID: CADT4RqByUyKzcsj6QSODNE7OaH2wwkEKK7h18wxGtNKgP4=r=Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)tao11(dot)riddles(dot)org(dot)uk>
wrote:

> >>>>> "Shay" == Shay Rojansky <roji(at)roji(dot)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)
>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message andreas.papst 2016-09-09 10:50:14 BUG #14320: systemd terminates postgresql hot standby instance 90 seconds after start
Previous Message Xtra Coder 2016-09-09 08:12:46 Performance issue: jsonb_object_agg() is twice slower than to_jsonb()