Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)
В списке pgsql-hackers по дате отправления:
| От | Darren Duncan |
|---|---|
| Тема | Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL) |
| Дата | |
| Msg-id | 51B929F9.9040909@darrenduncan.net обсуждение |
| Ответ на | Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL) (Josh Berkus <josh@agliodbs.com>) |
| Список | pgsql-hackers |
On 2013.06.12 10:11 AM, Josh Berkus wrote: >>> Multidim arrays are why we can't have nice things. >> >> Yeah, I think that was not our best moment. :-( > > Actually, if you think about it, we've never had "arrays" in PostgreSQL > ... we have always had matrixes. If you think about things that way, > most of the current functionality makes sense. If the type system were changed so that arrays were were always just one-dimensional, you can define your matrix simply as a binary relation type whose primary key attribute has the type of a fixed-length array of integers, where the number of elements in the array is the number of dimensions in the matrix, and the array elements themselves defined the coordinates in the matrix. This design confers a number of benefits. Also, the case of the zero-dimension matrix needs no special treatment; the key array has zero elements. Would that not work? -- Darren Duncan
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера