Re: Bug in DefineRange() with multiranges

2021-10-13 Thread Sergey Shinderuk
On 13.10.2021 07:21, Michael Paquier wrote: Looks fine seen from here, so I'll apply shortly. Thank you! -- Sergey Shinderukhttps://postgrespro.com/

Re: Bug in DefineRange() with multiranges

2021-10-12 Thread Michael Paquier
On Tue, Oct 12, 2021 at 08:52:29AM +0300, Sergey Shinderuk wrote: > Thanks, here is a patch. Looks fine seen from here, so I'll apply shortly. I was initially tempted to do pstrdup() on the object name returned by QualifiedNameGetCreationNamespace(), but just removing the pfree() is simpler.

Re: Bug in DefineRange() with multiranges

2021-10-11 Thread Sergey Shinderuk
On 10.10.2021 20:12, Peter Eisentraut wrote: On 04.10.21 19:09, Sergey Shinderuk wrote: I wonder what is the proper fix.  Just drop pfree() altogether or add pstrdup() instead?  I see that makeMultirangeTypeName() doesn't bother freeing its buf. I think removing the pfree()s is a correct fix.

Re: Bug in DefineRange() with multiranges

2021-10-10 Thread Peter Eisentraut
On 04.10.21 19:09, Sergey Shinderuk wrote: I wonder what is the proper fix.  Just drop pfree() altogether or add pstrdup() instead?  I see that makeMultirangeTypeName() doesn't bother freeing its buf. I think removing the pfree()s is a correct fix.

Bug in DefineRange() with multiranges

2021-10-04 Thread Sergey Shinderuk
Hi, My colleague, Alex Kozhemyakin, stumbled upon a bug in DefineRange(). The problem is here: @@ -1707,7 +1707,6 @@ DefineRange(ParseState *pstate, CreateRangeStmt *stmt) /* Create cast from the range type to its multirange type */ CastCreate(typoid, multirangeOid, castFun