Skip site navigation (1) Skip section navigation (2)


From: Neil Conway <neilc(at)samurai(dot)com>
To: Patches <pgsql-patches(at)postgresql(dot)org>
Subject: tuplestore_putvalues()
Date: 2008-02-29 00:37:53
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
Attached is a patch that allows an array of Datums + nulls to be
inserted into a tuplestore without first creating a HeapTuple, per
recent suggestion on -hackers. This avoids making an unnecessary copy.
There isn't a really analogous optimization to be applied to tuplesort:
it takes either a TTS, an IndexTuple or a basic Datum, none of which
involve an extra copy.

BTW, I notice that almost all of the callers of the various
tuplestore_put methods switch into the tuplestore's context first. We
could simplify their lives a bit by having the tuplestore remember the
context in which it is allocated and do the switch itself. Perhaps it's
not worth bothering with at this point, though.


Attachment: tuplestore_putvalues-1.patch
Description: text/x-patch (12.2 KB)


pgsql-patches by date

Next:From: Neil ConwayDate: 2008-02-29 02:50:35
Subject: Re: SRF memory leaks
Previous:From: Robert LorDate: 2008-02-28 23:52:27
Subject: Re: DTrace probe patch for OS X Leopard

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group