public inbox for [email protected]
help / color / mirror / Atom feedFrom: Rob Sargent <[email protected]>
To: pgsql-sql <[email protected]>
Subject: access sub elements using any()
Date: Mon, 31 Oct 2022 11:04:00 -0600
Message-ID: <[email protected]> (raw)
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?
view thread (4+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: access sub elements using any()
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox