Fix incorrect format placeholders
authorPeter Eisentraut <peter@eisentraut.org>
Fri, 24 Mar 2023 06:18:12 +0000 (07:18 +0100)
committerPeter Eisentraut <peter@eisentraut.org>
Fri, 24 Mar 2023 06:21:40 +0000 (07:21 +0100)
The fields of NLSVERSIONINFOEX are of type DWORD, which is unsigned
long, so the results of the computations being printed are also of
type unsigned long.

src/backend/utils/adt/pg_locale.c

index 42b6ad45cb82b72f86fe1b1353d6cda5eeff5d2e..6d06c394f0f1a7da9f13ffeab24055a686180923 100644 (file)
@@ -1778,7 +1778,7 @@ get_collation_actual_version(char collprovider, const char *collcollate)
                            collcollate,
                            GetLastError())));
        }
-       collversion = psprintf("%ld.%ld,%ld.%ld",
+       collversion = psprintf("%lu.%lu,%lu.%lu",
                               (version.dwNLSVersion >> 8) & 0xFFFF,
                               version.dwNLSVersion & 0xFF,
                               (version.dwDefinedVersion >> 8) & 0xFFFF,