Re: difficulty extracting variable-sized field on triggered row

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: difficulty extracting variable-sized field on triggered row
Дата
Msg-id 162867790712040710t46f2151s4d238e87540d614d@mail.gmail.com
обсуждение исходный текст
Ответ на difficulty extracting variable-sized field on triggered row  ("Glen W. Mabey" <Glen.Mabey@swri.org>)
Ответы Re: difficulty extracting variable-sized field on triggered row  ("Glen W. Mabey" <Glen.Mabey@swri.org>)
Список pgsql-general
On 04/12/2007, Glen W. Mabey <Glen.Mabey@swri.org> wrote:
> Hello,
>
> I have been trying to write a trigger in C operating on each row
> that would (as a first step) copy a field of type TEXT into a text*
> variable.
>
> I think that I've got the SPI_connect, SPI_fnumber, and SPI_getbinval
> calls correct, but this gives me a Datum.
>
> How do I convert a Datum to a text*?
>

use macro DatumGetPointer(datum)

Pavel

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

Предыдущее
От: Ted Byers
Дата:
Сообщение: Re: stored procedures and dynamic queries
Следующее
От: "Glen W. Mabey"
Дата:
Сообщение: Re: difficulty extracting variable-sized field on triggered row