Re: UNNEST result order vs Array data - Mailing list pgsql-sql

From Achilleas Mantzios
Subject Re: UNNEST result order vs Array data
Date
Msg-id 51C2E441.4020200@matrix.gatewaynet.com
Whole thread Raw
In response to Re: UNNEST result order vs Array data  (Vik Fearing <vik.fearing@dalibo.com>)
Responses Re: UNNEST result order vs Array data
List pgsql-sql
On 20/06/2013 13:45, Vik Fearing wrote:
> On 06/20/2013 12:40 PM, gmb wrote:
>> Hi all
>> I just want to confirm something regarding UNNEST function used with arrays.
>> I cannot see that it is specifically mentioned in the documentation , but
>> maybe because it is obvious.
>>
>> Is the order of the result guaranteed to be the order of the array
> Order is never guaranteed unless you specify an ORDER BY clause.
>
>
I really think that the order should exactly reflect the order in the array.
Think of ARRAY as Relation + ORDER. Relation + Order gives an ARRAY, 
ARRAY should give Relation *and* ORDER in return.

-- 
Achilleas Mantzios




pgsql-sql by date:

Previous
From: gmb
Date:
Subject: Re: UNNEST result order vs Array data
Next
From: Richard Huxton
Date:
Subject: Re: UNNEST result order vs Array data