Tom Lane-2 wrote
> dgillis@
> writes:
>> postgres=# set timezone='-0400';
>> SET
>> postgres=#
>> postgres=# show timezone;
>> TimeZone
>> ----------
>> unknown
>> (1 row)
>
>> postgres=# select now();
>> The connection to the server was lost. Attempting reset: Failed.
>
> Oh, hm, looks like it didn't occur to us that pg_tzset could reject
> out-of-range input :-(.
>
> Previous versions of PG would allow this, interpreting the GMT offset
> as 400 hours. In 9.4, the data is fed to the zic library, which thinks
> that the zone offset shouldn't exceed 1 week (168 hours); and we're
> not defending against a null result.
>
> While it's easy enough to add an error check, I wonder if there's an
> actual use-case for such a large zone offset? Or were you just
> playing around?
This does seem kind of a harsh for a mis-understanding that one cannot
specify a hours offset as a valid timezone identifier. ISTM the OP was
trying to set the timezone to EDT by specifying a -04 hours and 00 minutes
offset (- 04 00 = -0400 )...a 4-digit input like this shouldn't be
considered a -400 hour GMT offset...
David J.
--
View this message in context:
http://postgresql.1045698.n5.nabble.com/BUG-11014-Postgres-can-be-put-into-an-error-state-by-setting-invalid-timezone-tp5812271p5812283.html
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.