1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

Add collation support on Windows (MSVC build)

There is not yet support in initdb to populate the pg_collation
catalog, but if that is done manually, the rest should work.
This commit is contained in:
Peter Eisentraut
2011-04-10 00:14:20 +03:00
parent 00f11f419c
commit 11745364d0
5 changed files with 42 additions and 2 deletions

View File

@ -1374,6 +1374,11 @@ varstr_cmp(char *arg1, int len1, char *arg2, int len2, Oid collid)
((LPWSTR) a2p)[r] = 0;
errno = 0;
#ifdef HAVE_LOCALE_T
if (mylocale)
result = wcscoll_l((LPWSTR) a1p, (LPWSTR) a2p, mylocale);
else
#endif
result = wcscoll((LPWSTR) a1p, (LPWSTR) a2p);
if (result == 2147483647) /* _NLSCMPERROR; missing from mingw
* headers */