Skip to content

Commit 26eb0c7

Browse files
committed
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.
1 parent 89c5008 commit 26eb0c7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/timezone/pgtz.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
77
*
88
* IDENTIFICATION
9-
* $PostgreSQL: pgsql/src/timezone/pgtz.c,v 1.67 2010/03/12 21:40:36 tgl Exp $
9+
* $PostgreSQL: pgsql/src/timezone/pgtz.c,v 1.68 2010/04/06 20:35:11 mha Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -1091,7 +1091,8 @@ identify_system_timezone(void)
10911091
if ((r = RegQueryValueEx(key, "Std", NULL, NULL, zonename, &namesize)) != ERROR_SUCCESS)
10921092
{
10931093
ereport(WARNING,
1094-
(errmsg_internal("could not query value for 'std' to identify Windows timezone: %i", (int) r)));
1094+
(errmsg_internal("could not query value for 'std' to identify Windows timezone \"%s\": %i",
1095+
keyname, (int) r)));
10951096
RegCloseKey(key);
10961097
break;
10971098
}
@@ -1107,7 +1108,8 @@ identify_system_timezone(void)
11071108
if ((r = RegQueryValueEx(key, "Dlt", NULL, NULL, zonename, &namesize)) != ERROR_SUCCESS)
11081109
{
11091110
ereport(WARNING,
1110-
(errmsg_internal("could not query value for 'dlt' to identify Windows timezone: %i", (int) r)));
1111+
(errmsg_internal("could not query value for 'dlt' to identify Windows timezone \"%s\": %i",
1112+
keyname, (int) r)));
11111113
RegCloseKey(key);
11121114
break;
11131115
}

0 commit comments

Comments
 (0)