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

Re: tuplestore_putvalues()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: tuplestore_putvalues()
Date: 2008-02-29 06:32:40
Message-ID: 23186.1204266760@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-patches
Neil Conway <neilc(at)samurai(dot)com> writes:
> 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.

A small thought here: we were jousting recently over a point that came
down to whether or not tuplestore kept track of the tupdesc for the
tuples it was storing.  I can hardly imagine a use-case for a tuplestore
in which the tuples don't all have the same tupdesc.  I think I dropped
tupdesc from tuplestore's original API on the grounds that it wasn't
doing anything much with the tupdesc.  But now this patch adds back a
tuplestore API call that needs the tupdesc.  Would it be saner to supply
the tupdesc to tuplestore_begin_heap instead, as tuplesort does?

I haven't looked at all into what the implications of this would be,
either from a performance or number-of-places-to-change standpoint.
But it seems worth a bit of investigation while we're touching the
code.

Other than that issue, the patch seems OK in a quick once-over.

			regards, tom lane

In response to

pgsql-patches by date

Next:From: Peter EisentrautDate: 2008-02-29 07:24:57
Subject: Re: DTrace probe patch for OS X Leopard
Previous:From: Tom LaneDate: 2008-02-29 05:44:35
Subject: Re: DTrace probe patch for OS X Leopard

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