Re: [patch]overallocate memory for curly braces in array_out

2018-10-09 Thread Keiichi Hirobe
Sorry, I did not notice that you had already pushed it. Thank you for quick action. Cheers, Keiichi Hirobe 2018年9月28日(金) 9:23 Tom Lane : > Keiichi Hirobe writes: > > I am not sure whether to fix another bug, but I fixed and I attached a > new > > patch, > > please check it. > > I think this dup

Re: [patch]overallocate memory for curly braces in array_out

2018-09-27 Thread Tom Lane
Keiichi Hirobe writes: > I am not sure whether to fix another bug, but I fixed and I attached a new > patch, > please check it. I think this duplicates what I already committed at https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=87d9bbca13f9c6b8f6ee986f0e399cb83bd731d4

Re: [patch]overallocate memory for curly braces in array_out

2018-09-26 Thread Keiichi Hirobe
Hi, Thanks for the reply. I am not sure whether to fix another bug, but I fixed and I attached a new patch, please check it. Please note that I inserted a line for updating "overall_length" at line 1185. I checked below case. select ARRAY[ARRAY[1,2,3],ARRAY[4,5,6]]; (regular case) select '[3:4

Re: [patch]overallocate memory for curly braces in array_out

2018-09-24 Thread Tom Lane
Keiichi Hirobe writes: > Attached is a patch that fixes a bug > for miscounting total number of curly braces in output string in array_out. Wow, good catch! Testing this, I found there's a second way in which the space calculation is off: it always allocated one more byte than required, as a res

[patch]overallocate memory for curly braces in array_out

2018-09-23 Thread Keiichi Hirobe
Hi, Attached is a patch that fixes a bug for miscounting total number of curly braces in output string in array_out. Example1 {{1,2,3},{4,5,6}} -> dims[0] = 2, dims[1]= 3 - Without the patch 8 - After 3 Example2 N size one-dimensional array -> dim