Re: difficulty extracting variable-sized field on triggered row

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: difficulty extracting variable-sized field on triggered row
Дата
Msg-id 28769.1196783617@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: 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
"Glen W. Mabey" <Glen.Mabey@swri.org> writes:
> Is there somewhere that I am not adequately checking for an error?

1. You're passing SPI_getbinval an uninitialized bool pointer.

2. You're discarding its result, which you need.

3. You're not checking for a null, and the error check you do have
   is wrong/redundant.

4. Use DatumGetTextP(), not DatumGetPointer nor PG_DETOAST_DATUM.

            regards, tom lane

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: difficulty extracting variable-sized field on triggered row
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: difficulty extracting variable-sized field on triggered row