On 12/21/14, 7:08 PM, Ali Akbar wrote:
    Another positive benefit is that this won't break the code unless it
    uses the new API. This is a problem especially with external code (e.g.
    extensions), but the new API (initArray*) is not part of 9.4 so there's
    no such code. So that's nice.

    The one annoying thing is that this makes the API slighly unbalanced.
    With the new API you can use a shared memory context, which with the old
    one (not using the initArray* methods) you can't.

    But I'm OK with that, and it makes the patch smaller (15kB -> 11kB).

Yes, with this API, we can backpatch this patch to 9.4 (or below) if we need it 

I think this API is a good compromise of old API and new API. Ideally if we can 
migrate all code to new API (all code must call initArrayResult* before 
accumArrayResult*), we can remove parameter MemoryContext rcontext from 
accumArrayResult. Currently, the code isn't using the rcontext for anything 
except for old API calls (in first call to accumArrayResult).

Until we eliminate the API though, we should leave something in place that 
still uses the old one, to make certain we don't accidentally break it.
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com

Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to