| От | Tom Lane |
|---|---|
| Тема | Re: Are arrays broken in 7.0.3? |
| Дата | |
| Msg-id | 1951.977177284@sss.pgh.pa.us обсуждение |
| Ответ на | Are arrays broken in 7.0.3? (Jason Aten <jaten@CS.UCLA.EDU>) |
| Ответы |
Re: Are arrays broken in 7.0.3?
|
| Список | pgsql-general |
Jason Aten <jaten@CS.UCLA.EDU> writes:
> testdb=# select f[2][1:5] from arr; (ask row back, get two!)
This is implicitly an array slice operation, so it's the same as
select f[1:2][1:5] from arr;
If you want just the one row you need to write
select f[2:2][1:5] from arr;
The behavior of the cases with too few subscripts does seem pretty
unhelpful --- seems like either raising an error or returning a
slice would make more sense than returning NULL. But that's how
the code is set up at the moment.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера