Re: [PATCH] Add roman support for to_number function

From: Hunaid Sohail <hunaidpgml(at)gmail(dot)com>
To: Aleksander Alekseev <aleksander(at)timescale(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Maciek Sakrejda <maciek(at)pganalyze(dot)com>, maciek(at)sakrejda(dot)org
Subject: Re: [PATCH] Add roman support for to_number function
Date: 2024-09-05 13:07:34
Message-ID: CAMWA6yYb0ucH+Bx6NqjGBFB8vHRhu7+w-RxooOPLOK5gKhc33A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Sep 5, 2024 at 2:41 PM Aleksander Alekseev <aleksander(at)timescale(dot)com>
wrote:

>
> While playing with the patch I noticed that to_char(..., 'RN') doesn't
> seem to be test-covered. I suggest adding the following test:
>
> ```
> WITH rows AS (
> SELECT i, to_char(i, 'FMRN') AS roman
> FROM generate_series(1, 3999) AS i
> ) SELECT bool_and(to_number(roman, 'RN') = i) FROM rows;
>
> bool_and
> ----------
> t
> ```
>

I also noticed there are no tests for to_char roman format. The test you
provided covers roman format in both to_char and to_number. I will add it.
Thank you.

Regards,
Hunaid Sohail

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2024-09-05 13:25:47 Re: strange context message in spi.c?
Previous Message Alvaro Herrera 2024-09-05 13:03:32 Re: per backend I/O statistics