Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 681244764FC for ; Mon, 30 Sep 2002 10:42:04 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id B9A484764F2 for ; Mon, 30 Sep 2002 10:42:03 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.5/8.12.5) with ESMTP id g8UEg8hR021138; Mon, 30 Sep 2002 10:42:08 -0400 (EDT) To: Mike Sosteric Cc: Bruno Wolff III , pgsql-general@postgresql.org, pgsql-sql@postgresql.org Subject: Re: [SQL] arrays In-reply-to: References: Comments: In-reply-to Mike Sosteric message dated "Mon, 30 Sep 2002 06:38:56 -0600" Date: Mon, 30 Sep 2002 10:42:08 -0400 Message-ID: <21137.1033396928@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/1378 X-Sequence-Number: 30959 Mike Sosteric writes: > could you select where title[0] = 'en' You certainly could ... but bear in mind that there's no convenient way to make such a query be indexed, at present. So any values that you actually want to use as search keys had better be in their own fields. Now, if you are just using this as an extra search condition that picks one row out of a small number that are identified by another WHERE clause, then it's good enough to index for the other clause, and so the lack of an index for title[0] isn't an issue. In this case, with only a small number of possible values for title[0], it seems that an index wouldn't be helpful anyway. regards, tom lane