Re: Crash in json_to_record()

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: Crash in json_to_record()
Дата
Msg-id 1393213204.17606.6.camel@jdavis
обсуждение исходный текст
Ответ на Crash in json_to_record()  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-bugs
On Fri, 2014-02-07 at 10:24 -0800, Jeff Davis wrote:
> The attached script crashes on master. It looks like it assumes
> get_call_result_type() always returns a non-NULL tupdesc.

Proposed patch attached; will commit soon unless someone objects.

Checking that get_call_result_type() returns TYPEFUNC_COMPOSITE seems to
be the convention for ensuring the tupdesc is set. I changed the 3 call
sites that do not currently follow that convention (all in jsonfuncs.c).

The other two call sites don't seem to be real problems, but following
the convention seems best.

For the one call site that actually is a problem, I added a HINT to
suggest calling the function from the FROM clause.

Regards,
    Jeff Davis


Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Re: [HACKERS] Re: BUG #9210: PostgreSQL string store bug? not enforce check with correct characterSET/encoding
Следующее
От: Sandeep Thakkar
Дата:
Сообщение: Re: BUG #9307: I can not install the binary version 9.3.3 under Windows 7 Ultimate