Re: build array of composites in SPI

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: build array of composites in SPI
Дата
Msg-id b42b73150911171111r53fe5485p24ba1b5212977daf@mail.gmail.com
обсуждение исходный текст
Ответ на Re: build array of composites in SPI  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: build array of composites in SPI  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Tue, Nov 17, 2009 at 1:07 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Merlin Moncure <mmoncure@gmail.com> writes:
>> 2) build the composite via:
>>   2a) TupleDescGetAttInMetadata
>>   2b) BuildTupleFromCStrings
>>   2c) get datum/HeapTupleGetDatum
>
> If it's performance critical, you might want to avoid the extra overhead
> of the AttInMetadata API.  Especially if you know the column datatypes
> ahead of time, and even more especially if you have the values in datum
> rather than C-string form.  Consider using heap_form_tuple directly.

right...makes sense.  converted.  one last question: can you save off
the blessed TupleDesc (that is, make it static) between invocations of
the function (I'm not worried about it changing)?

merlin

В списке pgsql-general по дате отправления:

Предыдущее
От: Alexey Klyukin
Дата:
Сообщение: Re: plperl: spi_query_prepared/spi_fetchrow versus spi_exec_prepared: memory?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: build array of composites in SPI