Re: Test improvements and minor code fixes for formatting.c.

2024-09-26 Thread Tom Lane
Nathan Bossart writes: > On Sun, Sep 08, 2024 at 05:32:16PM -0400, Tom Lane wrote: >> In looking at this, I found that there's also no test coverage >> for the , V, or PL format codes. Also, the possibility of >> overflow while converting an input value to int in order to >> pass it to int_to

Re: Test improvements and minor code fixes for formatting.c.

2024-09-17 Thread Nathan Bossart
On Sun, Sep 08, 2024 at 05:32:16PM -0400, Tom Lane wrote: > In looking at this, I found that there's also no test coverage > for the , V, or PL format codes. Also, the possibility of > overflow while converting an input value to int in order to > pass it to int_to_roman was ignored. Attached

Re: Test improvements and minor code fixes for formatting.c.

2024-09-11 Thread Tom Lane
Aleksander Alekseev writes: > I'm having difficulties applying the patch. Could you please do `git > format-patch` and resend it? patch(1) is generally far more forgiving than 'git am'. regards, tom lane

Re: Test improvements and minor code fixes for formatting.c.

2024-09-11 Thread Hunaid Sohail
Hi, On Wed, Sep 11, 2024 at 2:33 PM Aleksander Alekseev < aleksan...@timescale.com> wrote: > I'm having difficulties applying the patch. Could you please do `git > format-patch` and resend it? > Yes, I guess there is some issue with the patch but somehow I was able to apply it. make installchec

Re: Test improvements and minor code fixes for formatting.c.

2024-09-11 Thread Aleksander Alekseev
Hi Tom, > Meh ... cfbot points out I did the float-to-int conversions wrong. > v2 attached. I'm having difficulties applying the patch. Could you please do `git format-patch` and resend it? -- Best regards, Aleksander Alekseev

Re: Test improvements and minor code fixes for formatting.c.

2024-09-08 Thread Tom Lane
I wrote: > [ v1-formatting-test-improvements.patch ] Meh ... cfbot points out I did the float-to-int conversions wrong. v2 attached. regards, tom lane diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 461fc3f437..e2d45989d8 100644 --- a/doc/src/sgml/func.

Test improvements and minor code fixes for formatting.c.

2024-09-08 Thread Tom Lane
Over in the thread about teaching to_number() to handle Roman numerals [1], it was noted that we currently have precisely zero test coverage for to_char()'s existing Roman-numeral code, except in the timestamp code path which shares nothing with the numeric code path. In looking at this, I found t