Re: Better support for whole-row operations and composite types

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Better support for whole-row operations and composite types
Дата
Msg-id 20442.1081051536@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Better support for whole-row operations and composite  (Joe Conway <mail@joeconway.com>)
Ответы Re: Better support for whole-row operations and composite  (Joe Conway <mail@joeconway.com>)
Список pgsql-hackers
Joe Conway <mail@joeconway.com> writes:
> For triggers, I was previously building up the arguments thus:
>      slot = TupleDescGetSlot(tupdesc);
>      slot->val = trigdata->tg_trigtuple;
>      arg[7] = PointerGetDatum(slot);

> I suppose now I should do this instead?
>      arg[7] = PointerGetDatum(trigdata->tg_trigtuple->t_data);

Hm, no, that won't work because a tuple being passed to a trigger
probably isn't going to contain valid type information.  The API for
calling triggers is different from calling ordinary functions, so
I never thought about trying to make it look the same.  At what point
are you trying to do the above, anyway?
        regards, tom lane


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

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