Re: Function array_agg(array) - Mailing list pgsql-hackers

From Ali Akbar
Subject Re: Function array_agg(array)
Date
Msg-id CACQjQLrPfFYn352v4A2Ho=D=RYtCX5x1SSbz3cpJrxOra6Gs5g@mail.gmail.com
Whole thread Raw
In response to Re: Function array_agg(array)  (Ali Akbar <the.apaan@gmail.com>)
Responses Re: Function array_agg(array)
List pgsql-hackers
So, is there any idea how we will handle NULL and empty array in array_agg(anyarray)? 
I propose we just reject those input because the output will make no sense:
- array_agg(NULL::int[]) --> the result will be indistinguished from array_agg of NULL ints.
- array_agg('{}'::int[]) --> how we determine the dimension of the result? is it 0? Or the result will be just an empty array {} ?

This updated patch rejects NULL and {} arrays as noted above.
 
Regards,
--
Ali Akbar
Attachment

pgsql-hackers by date:

Previous
From: Jim Nasby
Date:
Subject: Re: Autovacuum fails to keep visibility map up-to-date in mostly-insert-only-tables
Next
From: Magnus Hagander
Date:
Subject: Re: Superuser connect during smart shutdown