Re: How do I select composite array element that satisfy specific conditions.

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: a <372660931(at)qq(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: How do I select composite array element that satisfy specific conditions.
Date: 2018-05-23 13:31:45
Message-ID: CAKFQuwYTbGm84_2KVuCASrfP69UgvPQBCANtv7sG6r_tn-vxCw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wednesday, May 23, 2018, a <372660931(at)qq(dot)com> wrote:
>
> How could I select the element of Ay that satisfy x=3??
>

https://www.postgresql.org/docs/10/static/arrays.html#ARRAYS-SEARCHING

The note at the end of that section applies here though, you are forcing
yourself to fight the nature of the relational database by not normalizing
your data model. Converting your array of composites to a table is going
to make life considerably easier if you expect to have to performs searches
like you requrest help for here.

David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ron 2018-05-23 13:34:26 Re: [GENERAL] Postgre compatible version with RHEL 7.5
Previous Message Charles Clavadetscher 2018-05-23 13:22:52 RE: RE: How do I select composite array element that satisfy specific conditions.