Re: Dissecting Tuples in C

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: Dissecting Tuples in C
Дата
Msg-id 3EFB727E.50803@joeconway.com
обсуждение исходный текст
Ответ на Re: Dissecting Tuples in C  (Clay Luther <claycle@cisco.com>)
Список pgsql-interfaces
Clay Luther wrote:
> Hrmmmm....let me be more clear.
> 
> How do I get the TupleDesc for a HeapTuple, for example?  The Trigger
> structure has HeapTuples, but I need the TupleDesc as well to be able to
> use functions like SPI_getvalue().
> 

Take a look at ttdummy() in src/test/regress/regress.c.

Here's a snippet of the specific lines you need:
<snip>  TriggerData *trigdata = (TriggerData *) fcinfo->context;  rel = trigdata->tg_relation;  tupdesc = rel->rd_att;
</snip>

HTH,

Joe



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

Предыдущее
От: Clay Luther
Дата:
Сообщение: Re: Dissecting Tuples in C
Следующее
От: Philip Yarra
Дата:
Сообщение: ECPG thread success (kind of) on Linux