Are multiple array_aggs going to be in the same order?

From: Guyren Howe <guyren(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Are multiple array_aggs going to be in the same order?
Date: 2017-04-09 21:27:35
Message-ID: 592DF768-0FF1-4795-AAE9-B5B684A0469D@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

If I do a SELECT with a GROUP_BY and multiple ARRAY_AGGs, will the ARRAY_AGGs be guaranteed to have entries in the same (ie corresponding) order?

eg

SELECT
u.name,
ARRAY_AGG(o.order_date) AS order_dates,
ARRAY_AGG(o.order_total) AS order_totals
FROM
user u JOIN
orders o USING (user_id)
GROUP BY
u.user_id

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John Iliffe 2017-04-09 21:35:54 Re: Unable to connect to Postgresql
Previous Message Adrian Klaver 2017-04-09 21:02:47 Re: Unable to connect to Postgresql