Re: Better support for whole-row operations and composite

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: Better support for whole-row operations and composite
Дата
Msg-id 406E5316.2080808@joeconway.com
обсуждение исходный текст
Ответ на Re: Better support for whole-row operations and composite types  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Better support for whole-row operations and composite types  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:
> Joe Conway <mail@joeconway.com> writes:
>> /* for tuple args, convert to a one row data.frame */ 
>> TupleTableSlot *slot = (TupleTableSlot *) arg[i]; HeapTuple        tuples
>> = slot->val; TupleDesc        tupdesc = slot->ttc_tupleDescriptor;
> 
> Um.  Well, the arg is not a TupleTableSlot * anymore, so this is 
> guaranteed to fail.  This isn't part of what I thought the documented
>  SRF API was though.

I'm sure you're correct. The SRF API was for user defined functions, not
procedural languages anyway. I'll look at how the other procedural
languages handle tuple arguments.

> If you take the arg[i] value and pass it to GetAttributeByName or
> GetAttributeByNum it will work (with some compiler warnings) and
> AFAICS we never documented more than that.

OK, thanks,

Joe



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Better support for whole-row operations and composite types
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Better support for whole-row operations and composite types