Re: [PATCH] Add roman support for to_number function
Hunaid Sohail <hunaidpgml@gmail.com>
From: Hunaid Sohail <hunaidpgml@gmail.com>
To: Aleksander Alekseev <aleksander@timescale.com>,
pgsql-hackers@postgresql.org
Cc: Maciek Sakrejda <maciek@pganalyze.com>, maciek@sakrejda.org
Date: 2024-09-07T09:24:23Z
Lists: pgsql-hackers
Attachments
- v3-0001-Add-RN-rn-support-for-to_number-function.patch (application/octet-stream) patch v3-0001
Hi, 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 have added this test in the attached patch (v3). Thank you once again, Aleksander, for the suggestion. Regards, Hunaid Sohail
Commits
-
Support RN (roman-numeral format) in to_number().
- 172e6b3adb2e 18.0 landed