From: | Ali Akbar <the(dot)apaan(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Function array_agg(array) |
Date: | 2014-11-25 23:15:00 |
Message-ID: | CACQjQLqwadsE=L797yLygd9nbLJD4FL-S5Cuiy_90FSWMdgZ4g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2014-11-26 0:38 GMT+07:00 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
> > 2014-10-27 11:20 GMT+01:00 Ali Akbar <the(dot)apaan(at)gmail(dot)com>:
> >> [ array_agg_anyarray-13.patch ]
>
> > This patch is ready for commit
>
> I've committed this after some significant modifications.
>
> I did not like the API chosen, specifically the business about callers
> needing to deal with both accumArrayResult and accumMdArray, because that
> seemed pretty messy and error-prone.
>
Thanks!
When in the reviewing process, we tried to implement in existing API, and
it was messy, so the last patch is with two API. We didn't think what you
eventually did. 3 API: existing for scalar, a new API for array, _and_ a
new API for both. Great!!
Just curious, in accumArrayResultArr, while enlarging array and
nullbitmaps, why it's implemented with:
astate->abytes = Max(astate->abytes * 2,
> astate->nbytes + ndatabytes);
and
astate->aitems = Max(astate->aitems * 2, newnitems);
won't it be more consistent if it's implemented just like in the first
allocation?:
while (astate->aitems <= newnitems)
> astate->aitems *= 2;
Anyway, thanks for the big modifications. I learned a lot from that.
Regards,
--
Ali Akbar
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2014-11-25 23:22:27 | Re: Function array_agg(array) |
Previous Message | Adam Brightwell | 2014-11-25 23:01:20 | Re: Role Attribute Bitmask Catalog Representation |