can someone explain confusing array indexing nomenclature
| От | chrisj |
|---|---|
| Тема | can someone explain confusing array indexing nomenclature |
| Дата | |
| Msg-id | 8971770.post@talk.nabble.com обсуждение исходный текст |
| Ответы |
Re: can someone explain confusing array indexing nomenclature
|
| Список | pgsql-sql |
given the following table:
protocal2=> select * from sal_emp ;name | pay_by_quarter | schedule
-------+---------------------------+-------------------------------------------Bill | {10000,10000,10000,10000} |
{{meeting,lunch},{training,presentation}}Carol | {20000,25000,25000,25000} |
{{breakfast,consulting},{meeting,lunch}}
(2 rows)
why do the following two queries yield different results??
protocal2=> SELECT schedule[1][2] FROM sal_emp WHERE name = 'Bill';schedule
----------lunch
(1 row)
protocal2=> SELECT schedule[1:1][2] FROM sal_emp WHERE name = 'Bill'; schedule
-------------------{{meeting,lunch}}
(1 row)
--
View this message in context:
http://www.nabble.com/can-someone-explain-confusing-array-indexing-nomenclature-tf3229165.html#a8971770
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.
В списке pgsql-sql по дате отправления: