5858#include "catalog/pg_collation.h"
5959#include "catalog/pg_control.h"
6060#include "mb/pg_wchar.h"
61- #include "utils/builtins.h"
6261#include "utils/hsearch.h"
6362#include "utils/memutils.h"
6463#include "utils/pg_locale.h"
@@ -149,7 +148,6 @@ pg_perm_setlocale(int category, const char *locale)
149148char * result ;
150149const char * envvar ;
151150char * envbuf ;
152- char orig_result [LC_ENV_BUFSIZE ];
153151
154152#ifndef WIN32
155153result = setlocale (category ,locale );
@@ -175,7 +173,6 @@ pg_perm_setlocale(int category, const char *locale)
175173
176174if (result == NULL )
177175return result ;/* fall out immediately on failure */
178- strlcpy (orig_result ,result ,sizeof (orig_result ));
179176
180177/*
181178 * Use the right encoding in translated messages. Under ENABLE_NLS, let
@@ -234,17 +231,6 @@ pg_perm_setlocale(int category, const char *locale)
234231}
235232
236233snprintf (envbuf ,LC_ENV_BUFSIZE - 1 ,"%s=%s" ,envvar ,result );
237- if (strcmp (orig_result ,result )!= 0 )
238- {
239- char hex [2 * LC_ENV_BUFSIZE + 1 ];
240- unsigned hexlen ;
241-
242- hexlen =
243- hex_encode (result ,Min (1 + strlen (result ),LC_ENV_BUFSIZE ),hex );
244- hex [hexlen ]= '\0' ;
245- elog (FATAL ,"setlocale() result %s clobbered to 0x%s" ,
246- orig_result ,hex );
247- }
248234
249235if (putenv (envbuf ))
250236return NULL ;