Re: ORDER BY elements in ARRAY - Mailing list pgsql-sql

From David G. Johnston
Subject Re: ORDER BY elements in ARRAY
Date
Msg-id CAKFQuwZtFH9ZdrTvRMrE=Xq-HU0-xsmbfzmcyeSG7O5svtHW0Q@mail.gmail.com
Whole thread Raw
List pgsql-sql
On Tuesday, August 27, 2024, Andreas Joseph Krogh <andreas@visena.com> wrote:

Hi, I have this query:

 

SELECT    comp.entity_id as company_id, comp.companyname AS company_name     , ARRAY(        SELECT            (pers.entity_id                , pers.firstname                , pers.lastname                )::PersonTypeTest        FROM onp_crm_person AS pers        WHERE pers.relation_id = comp.entity_id

Add order by here 

       ) as person_array

FROM onp_crm_relation comp
ORDER BY person_array
;
 
David J.
 

pgsql-sql by date:

Previous
From: Jan Bernitt
Date:
Subject: object mapping for json/jsonb columns
Next
From: Steve Midgley
Date:
Subject: Re: object mapping for json/jsonb columns