mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Change ginMergeItemPointers to return a palloc'd array.
That seems nicer than making it the caller's responsibility to pass a suitable-sized array. All the callers were just palloc'ing an array anyway.
This commit is contained in:
@ -67,12 +67,9 @@ addItemPointersToLeafTuple(GinState *ginstate,
|
||||
/* merge the old and new posting lists */
|
||||
oldItems = ginReadTuple(ginstate, attnum, old, &oldNPosting);
|
||||
|
||||
newNPosting = oldNPosting + nitem;
|
||||
newItems = (ItemPointerData *) palloc(sizeof(ItemPointerData) * newNPosting);
|
||||
|
||||
newNPosting = ginMergeItemPointers(newItems,
|
||||
items, nitem,
|
||||
oldItems, oldNPosting);
|
||||
newItems = ginMergeItemPointers(items, nitem,
|
||||
oldItems, oldNPosting,
|
||||
&newNPosting);
|
||||
|
||||
/* Compress the posting list, and try to a build tuple with room for it */
|
||||
res = NULL;
|
||||
|
Reference in New Issue
Block a user