On 1/9/24 2:31 PM, Jeff Davis wrote:
> On Tue, 2024-01-09 at 14:17 -0800, Jeremy Schneider wrote:
>> I think we missed something in psql, pretty sure I applied all the
>> patches but I see this error:
>>
>> =# \l
>> ERROR:  42703: column d.datlocale does not exist
>> LINE 8:   d.datlocale as "Locale",
>>
> 
> Thank you. I'll fix this in the next patch set.

Very minor nitpick/request. Not directly with this patch set but with
the category_test which is related and also recently committed.

I'm testing out "make update-unicode" scripts, and due to my system ICU
version being different from the PostgreSQL unicode version I get the
expected warnings from category_test:

Postgres Unicode Version:       15.1
ICU Unicode Version:            14.0
Skipped 5116 codepoints unassigned in ICU due to Unicode version mismatch.
category_test: All tests successful!

I know it's minor, but I saw the 5116 skipped codepoints and saw "all
tests succeeded" but I thought the output might be a little nicer if we
showed the count of tests that succeeded. For example:

Postgres Unicode Version:       15.1
ICU Unicode Version:            14.0
Skipped 5116 codepoints unassigned in ICU due to Unicode version mismatch.
category_test: All 1108996 tests successful!

It's a minor tweak to a script that I don't think even runs in the
standard build; any objections?  Patch attached.

-Jeremy


-- 
http://about.me/jeremy_schneider
From 5ff09eb7371abc14cd8537b4e3265e35f030794f Mon Sep 17 00:00:00 2001
From: Jeremy Schneider <schnei...@ardentperf.com>
Date: Wed, 10 Jan 2024 07:25:17 +0000
Subject: [PATCH] Output count of checked codepoints.

---
 src/common/unicode/category_test.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/common/unicode/category_test.c 
b/src/common/unicode/category_test.c
index 6cd7cd1a5f..62ff345066 100644
--- a/src/common/unicode/category_test.c
+++ b/src/common/unicode/category_test.c
@@ -53,6 +53,7 @@ main(int argc, char **argv)
        int                     icu_unicode_version = 
parse_unicode_version(U_UNICODE_VERSION);
        int                     pg_skipped_codepoints = 0;
        int                     icu_skipped_codepoints = 0;
+       int                     checked_codepoints = 0;
 
        printf("Postgres Unicode Version:\t%s\n", PG_UNICODE_VERSION);
        printf("ICU Unicode Version:\t\t%s\n", U_UNICODE_VERSION);
@@ -90,6 +91,10 @@ main(int argc, char **argv)
                                exit(1);
                        }
                }
+               else
+               {
+                       checked_codepoints++;
+               }
        }
 
        if (pg_skipped_codepoints > 0)
@@ -99,7 +104,8 @@ main(int argc, char **argv)
                printf("Skipped %d codepoints unassigned in ICU due to Unicode 
version mismatch.\n",
                           icu_skipped_codepoints);
 
-       printf("category_test: All tests successful!\n");
+       printf("category_test: All %d tests successful!\n",
+                  checked_codepoints);
        exit(0);
 #else
        printf("ICU support required for test; skipping.\n");
-- 
2.34.1

Reply via email to