SELECT using arrays

From: Evan Klinger <evan715(at)sirius(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: SELECT using arrays
Date: 1999-07-15 17:33:16
Message-ID: 378E1B5C.BB792298@sirius.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I have asked this question on all of the appropriate pgsql mailing lists
and no one has been able to help. Please, if you could, help me out with
this problem. Thank you.
--

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 text[][] (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

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael J Schout 1999-07-15 17:40:42 migration to v6.5
Previous Message Burgess, Trevor - HMS 1999-07-15 16:40:22 Locking