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

Поиск
Список
Период
Сортировка
От Zachary Smith
Тема Bug: array starting index seems incorrect (different for 1D and 2D arrays)
Дата
Msg-id CAN4qkmF0=s8iRtcooKaJjY13vao1KQO3f80C_zJshYQfhhYDog@mail.gmail.com
обсуждение исходный текст
Ответы Re: Bug: array starting index seems incorrect (different for 1D and2D arrays)
Список pgsql-bugs
Hi,

Some behaviour that I recently came across in PostgreSQL seems suspicious - I'm not sure whether it's a bug or not, but it seems like it could be. 

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

A short description: For a 2D array arr = ( (x, y), (x, y) ), the first element of the outer array is at position 1, but the first element of an inner array is at position 0.

Best regards,
Zach

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Robert Lichtenberger
Дата:
Сообщение: Restricted interval data type
Следующее
От: Dmitry Dolgov
Дата:
Сообщение: Re: Bug: array starting index seems incorrect (different for 1D and2D arrays)