1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-29 10:41:53 +03:00

Log the actual timezone name that we fail to look up the values for in

case the registry data doesn't follow the format we expect, to facilitate
debugging.
This commit is contained in:
Magnus Hagander
2010-04-06 20:35:17 +00:00
parent e4404121cd
commit 547e63680b

View File

@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/timezone/pgtz.c,v 1.63 2009/06/11 14:49:15 momjian Exp $ * $PostgreSQL: pgsql/src/timezone/pgtz.c,v 1.63.2.1 2010/04/06 20:35:17 mha Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -1087,7 +1087,8 @@ identify_system_timezone(void)
if ((r = RegQueryValueEx(key, "Std", NULL, NULL, zonename, &namesize)) != ERROR_SUCCESS) if ((r = RegQueryValueEx(key, "Std", NULL, NULL, zonename, &namesize)) != ERROR_SUCCESS)
{ {
ereport(WARNING, ereport(WARNING,
(errmsg_internal("could not query value for 'std' to identify Windows timezone: %i", (int) r))); (errmsg_internal("could not query value for 'std' to identify Windows timezone \"%s\": %i",
keyname, (int) r)));
RegCloseKey(key); RegCloseKey(key);
break; break;
} }
@ -1103,7 +1104,8 @@ identify_system_timezone(void)
if ((r = RegQueryValueEx(key, "Dlt", NULL, NULL, zonename, &namesize)) != ERROR_SUCCESS) if ((r = RegQueryValueEx(key, "Dlt", NULL, NULL, zonename, &namesize)) != ERROR_SUCCESS)
{ {
ereport(WARNING, ereport(WARNING,
(errmsg_internal("could not query value for 'dlt' to identify Windows timezone: %i", (int) r))); (errmsg_internal("could not query value for 'dlt' to identify Windows timezone \"%s\": %i",
keyname, (int) r)));
RegCloseKey(key); RegCloseKey(key);
break; break;
} }