From 11745364d074f3a7ee54c98fad55cfb5c5149326 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Sun, 10 Apr 2011 00:14:20 +0300 Subject: 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. --- src/backend/utils/adt/varlena.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/backend/utils/adt/varlena.c') diff --git a/src/backend/utils/adt/varlena.c b/src/backend/utils/adt/varlena.c index 3587fe45951..7a545214755 100644 --- a/src/backend/utils/adt/varlena.c +++ b/src/backend/utils/adt/varlena.c @@ -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 */ -- cgit v1.2.3