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

Reply via email to