Re: [SQL] death of array? - Mailing list pgsql-sql

From David G. Johnston
Subject Re: [SQL] death of array?
Date
Msg-id CAKFQuwYZeUjUz1rBOJSCeO08zg1ugzOLVpPA8BuZVe5pvK1cnw@mail.gmail.com
Whole thread Raw
In response to Re: [SQL] death of array?  (Rob Sargent <robjsargent@gmail.com>)
Responses Re: [SQL] death of array?  (Rob Sargent <robjsargent@gmail.com>)
List pgsql-sql
On Fri, Apr 7, 2017 at 8:57 AM, Rob Sargent <robjsargent@gmail.com> wrote:
Understood but  true if any match is found, I need every array member to match as I want them all to be of a specific people as input into the query (so field = all(array_col))  and "field" here would be people_member.person_id and using that yields zero results in full query (very quickly though).

​I didn't actually attempt to comprehend your original email.  If you want to supply a self-contained, functioning, query and expected output (ideally something simpler but that covers your main question) I'd be inclined to dig further.  Even a broken one with what you think should work would be

person = ALL(persons) doesn't really seem like it will typically work.

Here are the various array operators supplied by PostgreSQL.  You might find one of them helpful.  In particular "contains".


David J.

pgsql-sql by date:

Previous
From: Rob Sargent
Date:
Subject: Re: [SQL] death of array?
Next
From: Rob Sargent
Date:
Subject: Re: [SQL] death of array?