Re: Array dimension lost if dimension length is zero
От | Shay Rojansky |
---|---|
Тема | Re: Array dimension lost if dimension length is zero |
Дата | |
Msg-id | CADT4RqDZ2+MfHC-bQ86cG1-q+=c_6Gt9BZoXME6+B9h=cw6XzQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Array dimension lost if dimension length is zero (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | 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 по дате отправления: