Re: tuplestore_putvalues()
От | Tom Lane |
---|---|
Тема | Re: tuplestore_putvalues() |
Дата | |
Msg-id | 23186.1204266760@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | tuplestore_putvalues() (Neil Conway <neilc@samurai.com>) |
Список | pgsql-patches |
Neil Conway <neilc@samurai.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
В списке pgsql-patches по дате отправления: