Re: Wrong width of UNION statement

2020-06-12 Thread Kenichiro Tanaka
Hello,Ashutosh Thank you for your response. >We already have that infrastructure, IIUC through commit That's good! >Can we use that to fix this bug? I'll try it. But this is my first hack,I think I need time. Regards Kenichiro Tanaka 2020年6月8日(月) 22:11 Ashutosh Bapat : > > On Mon, Jun 1, 2020 a

Re: Wrong width of UNION statement

2020-06-08 Thread Ashutosh Bapat
On Mon, Jun 1, 2020 at 8:35 PM Tom Lane wrote: > > Kenichiro Tanaka writes: > > I think table column width of UNION statement should be equal one of UNION > > ALL. > > I don't buy that argument, because there could be type coercions involved, > so that the result width isn't necessarily equal t

Re: Wrong width of UNION statement

2020-06-04 Thread Kenichiro Tanaka
Hello, Thank you for your quick response and sorry for my late reply. > (I suppose you're using UTF8 encoding...) It is right. As you said, my encoding of database is UTF8. >There's room for improvement there, but this is all bound up in the legacy >mess that we have in prepunion.c. At first,I t

Re: Wrong width of UNION statement

2020-06-01 Thread Tom Lane
Kenichiro Tanaka writes: > I think table column width of UNION statement should be equal one of UNION > ALL. I don't buy that argument, because there could be type coercions involved, so that the result width isn't necessarily equal to any one of the inputs. Having said that, the example you g

Wrong width of UNION statement

2020-06-01 Thread Kenichiro Tanaka
Hello hackers I think I found a bug about estimating width of table column when I perform SQL with UNION statement. I think table column width of UNION statement should be equal one of UNION ALL. But they don't match.This can be reproduce it on HEAD. See following example. --CREATE TEST TABLE