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.
---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly