Received: from mail3.sirius.com (mail3.sirius.com [205.134.253.133]) by hub.org (8.9.3/8.9.3) with ESMTP id RAA13424; Wed, 14 Jul 1999 17:11:31 -0400 (EDT) (envelope-from evan715@sirius.com) Received: from sirius.com (ppp-asok08--186.sirius.net [205.134.245.186]) by mail3.sirius.com (8.9.3/8.9.1) with ESMTP id OAA45592; Wed, 14 Jul 1999 14:13:02 -0700 (PDT) Sender: root@mail3.sirius.com Message-ID: <378CFB7C.6BE05DA0@sirius.com> Date: Wed, 14 Jul 1999 14:05:00 -0700 From: Evan Klinger X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.2.10 i686) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-hackers@postgresql.org CC: pgsql-sql@postgresql.org Subject: SELECT using arrays Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I have been playing around with this for some time now to no avail. I have a table info with a two-dimensional text type array action. Is there any way to select the corresponding value of one of the elements without knowing the order of the elements? E.g. CREATE TABLE info (action text[][]); INSERT INTO info VALUES ('{{"VAR","VAL"},{"VAR2","VAL2"}}'); Now what SELECT query will search for "VAR" within action (in this case it is the first element, but it may not always be) and print out "VAL." Any information would be greatly appreciated. Thank you very much. Evan