json_populate_record issue - TupleDesc reference leak - Mailing list pgsql-hackers

From Pavel Stehule
Subject json_populate_record issue - TupleDesc reference leak
Date
Msg-id CAFj8pRD9T7YwWsAXJQHUHQXgU8AV55NujfhtfYEZKFCb-CSdHw@mail.gmail.com
Whole thread Raw
Responses Re: json_populate_record issue - TupleDesc reference leak  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
Hi

When I tested json_populate_function in test http://stackoverflow.com/questions/7711432/how-to-set-value-of-composite-variable-field-using-dynamic-sql/28673097#28673097 I found a small issue

create type pt as (a int, b int);

postgres=# select json_populate_record('(10,20)'::pt, '{}');
WARNING:  TupleDesc reference leak: TupleDesc 0x7f10fcf41400 (567018,-1) still referenced
 json_populate_record
----------------------
 (10,20)
(1 row)

jsonb is ok

postgres=# select jsonb_populate_record('(10,20)'::pt, '{}');
 jsonb_populate_record
-----------------------
 (10,20)
(1 row)

Regards

Pavel

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: SSL renegotiation
Next
From: Henry B Hotz
Date:
Subject: Re: SSL renegotiation