access sub elements using any() - Mailing list pgsql-sql

From Rob Sargent
Subject access sub elements using any()
Date
Msg-id 5fb866d1-8d2f-5118-18e2-9bbf227cbf1a@gmail.com
Whole thread Raw
Responses Re: access sub elements using any()  ("Torsten Grust" <teggy@fastmail.com>)
Re: access sub elements using any()  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
Given an array of arrays ( e.g. v = {{1,'a'},{2,'b'},{3,'c'},{2,'d'}} ) is it possible, in plain sql, to access the first element of the listed arrays using the IN function?  Say I wanted just those with 2 as first element.  "where 2 = any(v[1])" does not work and not sure it's supported.   And I cannot craft a lhs to fussy-match each of the elements in v.  Can this be done?

pgsql-sql by date:

Previous
From: Steve Midgley
Date:
Subject: Re: select only 1 pair
Next
From: "Torsten Grust"
Date:
Subject: Re: access sub elements using any()