Re: [HACKERS] json_populate_record issue - TupleDesc reference leak

2015-05-04 Thread Andrew Dunstan
On 04/30/2015 08:36 AM, Pavel Stehule wrote: Still issue is not fixed still create type pt as (a int, b int); postgres=# select json_populate_record('(10,20)'::pt, '{}'); WARNING: TupleDesc reference leak: TupleDesc 0x7f413ca325b0 (16560,-1) still referenced Looking at it now. (Please re

Re: [HACKERS] json_populate_record issue - TupleDesc reference leak

2015-04-30 Thread Pavel Stehule
Still issue is not fixed still create type pt as (a int, b int); postgres=# select json_populate_record('(10,20)'::pt, '{}'); WARNING: TupleDesc reference leak: TupleDesc 0x7f413ca325b0 (16560,-1) still referenced 2015-04-30 14:32 GMT+02:00 Bruce Momjian : > On Thu, Feb 26, 2015 at 05:31:44PM

Re: [HACKERS] json_populate_record issue - TupleDesc reference leak

2015-04-30 Thread Bruce Momjian
On Thu, Feb 26, 2015 at 05:31:44PM -0500, Tom Lane wrote: > Andrew Dunstan writes: > > This doesn't look quite right. Shouldn't we unconditionally release the > > Tupledesc before the returns at lines 2118 and 2127, just as we do at > > the bottom of the function at line 2285? > > I think Pavel

Re: [HACKERS] json_populate_record issue - TupleDesc reference leak

2015-02-26 Thread Tom Lane
Andrew Dunstan writes: > This doesn't look quite right. Shouldn't we unconditionally release the > Tupledesc before the returns at lines 2118 and 2127, just as we do at > the bottom of the function at line 2285? I think Pavel's patch is probably OK as-is, because the tupdesc returned by get_cal

Re: [HACKERS] json_populate_record issue - TupleDesc reference leak

2015-02-26 Thread Andrew Dunstan
On 02/23/2015 12:56 PM, Pavel Stehule wrote: by the way - this feature is undocumented - I though so only value used as type holder is not used. Should be documented better, - if I understand - it is base stone for implementation #= hstore operator some nice example postgres=# select json_

Re: [HACKERS] json_populate_record issue - TupleDesc reference leak

2015-02-23 Thread Pavel Stehule
by the way - this feature is undocumented - I though so only value used as type holder is not used. Should be documented better, - if I understand - it is base stone for implementation #= hstore operator some nice example postgres=# select json_populate_record('(10,20)'::pt, '{"a":30}'); json_p

[HACKERS] json_populate_record issue - TupleDesc reference leak

2015-02-23 Thread Pavel Stehule
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