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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, Maciek Sakrejda <m(dot)sakrejda(at)gmail(dot)com>, Hunaid Sohail <hunaidpgml(at)gmail(dot)com>
Subject: Re: Test improvements and minor code fixes for formatting.c.
Date: 2024-09-26 15:04:33
Message-ID: 320335.1727363073@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Nathan Bossart <nathandbossart(at)gmail(dot)com> 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 EEEE, 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 is a patch that
>> adds more test coverage and cleans up the Roman-numeral code
>> a little bit.

> I stared at the patch for a while, and it looks good to me.

Pushed, thanks for looking!

>> BTW, I also discovered that there is a little bit of support
>> for a "B" format code: we can parse it, but then we ignore it.

> AFAICT it's been like that since it was introduced [0]. I searched the
> archives and couldn't find any discussion about this format code. Given
> that, I don't have any concerns about removing it unless it causes ERRORs
> for calls that currently succeed, but even then, it's probably fine. This
> strikes me as something that might be fun for an aspiring hacker, though.

Yeah, I left that alone for now. I don't have much interest in
making it work, but perhaps someone else will.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2024-09-26 15:05:52 Re: Opinion poll: Sending an automated email to a thread when it gets added to the commitfest
Previous Message Christoph Berg 2024-09-26 14:51:54 Re: [PATCH] Extend ALTER OPERATOR to support adding commutator, negator, hashes, and merges