Neil Conway <[EMAIL PROTECTED]> 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

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

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to