From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Rob Sargent <robjsargent(at)gmail(dot)com> |
Cc: | "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: death of array? |
Date: | 2017-04-07 16:02:29 |
Message-ID: | CAKFQuwYZeUjUz1rBOJSCeO08zg1ugzOLVpPA8BuZVe5pvK1cnw@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Fri, Apr 7, 2017 at 8:57 AM, Rob Sargent <robjsargent(at)gmail(dot)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".
https://www.postgresql.org/docs/9.6/static/functions-array.html
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Rob Sargent | 2017-04-07 16:17:18 | Re: death of array? |
Previous Message | Rob Sargent | 2017-04-07 15:57:22 | Re: death of array? |