Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 7CF339FBB81 for ; Wed, 14 Feb 2007 15:31:55 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 09553-07 for ; Wed, 14 Feb 2007 15:31:43 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from talk.nabble.com (www.nabble.com [72.21.53.35]) by postgresql.org (Postfix) with ESMTP id 805E89FBC17 for ; Wed, 14 Feb 2007 15:31:39 -0400 (AST) Received: from [72.21.53.38] (helo=jubjub.nabble.com) by talk.nabble.com with esmtp (Exim 4.50) id 1HHPqs-00022D-HL for pgsql-sql@postgresql.org; Wed, 14 Feb 2007 11:31:38 -0800 Message-ID: <8971770.post@talk.nabble.com> Date: Wed, 14 Feb 2007 11:31:38 -0800 (PST) From: chrisj To: pgsql-sql@postgresql.org Subject: can someone explain confusing array indexing nomenclature MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: chrisj.wood@sympatico.ca X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200702/157 X-Sequence-Number: 27491 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.