aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/variable.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/commands/variable.c')
-rw-r--r--src/backend/commands/variable.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/backend/commands/variable.c b/src/backend/commands/variable.c
index e6d65c175d6..64fbf28a1e1 100644
--- a/src/backend/commands/variable.c
+++ b/src/backend/commands/variable.c
@@ -372,6 +372,13 @@ check_timezone(char **newval, void **extra, GucSource source)
}
}
+ /* Test for failure in pg_tzset_offset, which we assume is out-of-range */
+ if (!myextra.session_timezone)
+ {
+ GUC_check_errdetail("UTC timezone offset is out of range.");
+ return false;
+ }
+
/*
* Prepare the canonical string to return. GUC wants it malloc'd.
*