SELECT using arrays - Mailing list pgsql-sql

From Evan Klinger
Subject SELECT using arrays
Date
Msg-id 378CFB7C.6BE05DA0@sirius.com
Whole thread Raw
Responses Re: [SQL] SELECT using arrays  (Herouth Maoz <herouth@oumail.openu.ac.il>)
List pgsql-sql
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


pgsql-sql by date:

Previous
From: Steven Bradley
Date:
Subject: Re: [SQL] WHERE clause?
Next
From: Kyle Bateman
Date:
Subject: How big can a transaction query be?