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 CADT4RqDZ2+MfHC-bQ86cG1-q+=c_6Gt9BZoXME6+B9h=cw6XzQ@mail.gmail.com
Whole thread Raw
In response to Re: Array dimension lost if dimension length is zero  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Ah, I see. And changing this in a major version is out of the question? It
makes dealing with arrays more complicated than it should be on the client
side etc.

On Thu, Sep 8, 2016 at 5:32 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> Shay Rojansky <roji@roji.org> writes:
> > An Npgsql user has reported an edge case use which seems to be a bug.
> > When sending a multidimensional array to PostgreSQL, if the length of a
> > dimension is 0, that dimension is lost. That is, the user sends a
> > 2-dimensional array with 0 for both dimensions; trying to read this back
> > will return a 1-dimensional array.
>
> This is intentional: all empty arrays are alike, with zero dimensions
> (not one dimension, but none).
>
> Probably a lot of these decisions would be made differently if we were
> starting over in a green field; but since we're not, I'm disinclined
> to touch it.
>
>                         regards, tom lane
>

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Array dimension lost if dimension length is zero
Next
From: leohuanruan@gmail.com
Date:
Subject: BUG #14319: Logical decoding dropping statements in subtransactions