Re: [PATCH] Add roman support for to_number function

Поиск
Список
Период
Сортировка
От Hunaid Sohail
Тема Re: [PATCH] Add roman support for to_number function
Дата
Msg-id CAMWA6yYb0ucH+Bx6NqjGBFB8vHRhu7+w-RxooOPLOK5gKhc33A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCH] Add roman support for to_number function  (Aleksander Alekseev <aleksander@timescale.com>)
Список pgsql-hackers


On Thu, Sep 5, 2024 at 2:41 PM Aleksander Alekseev <aleksander@timescale.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

В списке pgsql-hackers по дате отправления: