Re: strange tuple from ExecutorRun

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: strange tuple from ExecutorRun
Дата
Msg-id 13367.1195230143@sss.pgh.pa.us
обсуждение исходный текст
Ответ на strange tuple from ExecutorRun  ("Pavel Stehule" <pavel.stehule@gmail.com>)
Список pgsql-hackers
[ not directly related to your bug, but... ]

"Pavel Stehule" <pavel.stehule@gmail.com> writes:
>                 result = ExecutorRun(qdesc, ForwardScanDirection, 1L);

>                 tuple = ExecMaterializeSlot(result);

>                 values = (Datum *) palloc(nargs * sizeof(Datum));
>                 nulls = (char *) palloc(nargs * sizeof(char));

>                 /* copy typle to current context */
>                 tuple = heap_copytuple(tuple);

>                 heap_deform_tuple(tuple, qdesc->tupDesc, values, nulls);

Surely that's the hard way, considering that the output tupleslot is
probably *already* a values/nulls array.  Use slot_getattr(), or call
slot_getallattrs() and then reference the slot's arrays directly.
        regards, tom lane


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

Предыдущее
От: Sam Mason
Дата:
Сообщение: Re: Javascript support in the backend, i.e. PL/JS
Следующее
От: Tom Lane
Дата:
Сообщение: Re: AllocSetStats uses fprintf instead of elog