Re: Bug: array starting index seems incorrect (different for 1D and 2D arrays)

From: Dmitry Dolgov <9erthalion6(at)gmail(dot)com>
To: Zachary Smith <zachsmith(dot)sa(at)gmail(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: Bug: array starting index seems incorrect (different for 1D and 2D arrays)
Date: 2019-09-18 11:09:02
Message-ID: CA+q6zcWP-gp+V3m0N0TL0EMBY5S=MrwyaXfPvip+54HpFYrwjw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

> On Wed, Sep 18, 2019 at 12:47 PM Zachary Smith <zachsmith(dot)sa(at)gmail(dot)com> wrote:
>
> I found that, using arrays, I have different starting indices when accessing
> 1D arrays nested in 2D arrays. A full description of the bugs (and the code
> to reproduce) is on dba.stackechange:
> https://dba.stackexchange.com/questions/249035/why-do-postgresql-arrays-have-different-starting-indices-for-1d-and-2d-arrays

In the attached examples there is an array of points, not a 2d array. Judging
from the documentation, accessing an element of a point could be done via
indexes 0 and 1, but for an array it starts from 1.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2019-09-18 13:24:46 BUG #16012: vacuum full, something weird
Previous Message Zachary Smith 2019-09-18 10:40:20 Bug: array starting index seems incorrect (different for 1D and 2D arrays)