Re: C Function causes backend to die in 7.4.3

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: C Function causes backend to die in 7.4.3
Дата
Msg-id 19560.1094135202@sss.pgh.pa.us
обсуждение исходный текст
Ответ на C Function causes backend to die in 7.4.3  (Graeme Hinchliffe <graeme.hinchliffe@zeninternet.co.uk>)
Список pgsql-general
Graeme Hinchliffe <graeme.hinchliffe@zeninternet.co.uk> writes:

>   HeapTuple rettuple;

>   // Commented out code is here

>   return PointerGetDatum(rettuple);

It surprises you that returning an uninitialized pointer value will
crash the code that tries to use the pointer?

I strongly recommend using a compiler that will warn about uninitialized
values.  If using gcc, you should use -O1 (at least).

I dunno what the original problem was, but maybe you just neglected to
recompile the function against 7.4 headers?  We don't generally
guarantee binary compatibility of user-defined functions across major
releases.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: zombie primary key lurches out of database to devour the brains of the unwary
Следующее
От: Jeff Boes
Дата:
Сообщение: Re: Join efficiency