ROLLBACK of SET TimeZone

From: "Alexander M(dot) Pravking" <fduch(at)antar(dot)bryansk(dot)ru>
To: pgsql-bugs(at)postgresql(dot)org
Subject: ROLLBACK of SET TimeZone
Date: 2005-02-14 12:10:13
Message-ID: 20050214121013.GA71264@dyatel.antar.bryansk.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

If I don't specify time zone either in config or using "SET TimeZone"
first, "SET TimeZone" inside a transaction isn't rolled back. System
time zone is actually Europe/Moscow. Here's an example:

fduch(at)~=# SELECT current_setting('TimeZone'), now();
current_setting | now
-----------------+-------------------------------
unknown | 2005-02-14 15:03:41.972955+03
(1 row)

fduch(at)~=# BEGIN ; SET TimeZone TO 'America/New_York'; SELECT current_setting('TimeZone'), now();
BEGIN
SET
current_setting | now
------------------+-------------------------------
America/New_York | 2005-02-14 07:03:46.982974-05
(1 row)

fduch(at)~*=# ROLLBACK ; SELECT current_setting('TimeZone'), now();
ROLLBACK
current_setting | now
------------------+------------------------------
America/New_York | 2005-02-14 07:03:51.34979-05
(1 row)

However, with explicit initial time zone, it get rolled back okay:

fduch(at)~=# SET TimeZone TO 'Europe/Moscow'; SELECT current_setting('TimeZone'), now();
SET
current_setting | now
-----------------+-------------------------------
Europe/Moscow | 2005-02-14 15:03:55.552894+03
(1 row)

fduch(at)~=# BEGIN ; SET TimeZone TO 'America/New_York'; SELECT current_setting('TimeZone'), now();
BEGIN
SET
current_setting | now
------------------+-------------------------------
America/New_York | 2005-02-14 07:03:59.891249-05
(1 row)

fduch(at)~*=# ROLLBACK ; SELECT current_setting('TimeZone'), now();
ROLLBACK
current_setting | now
-----------------+------------------------------
Europe/Moscow | 2005-02-14 15:04:06.67614+03
(1 row)

fduch(at)~=# SELECT version();
version
------------------------------------------------------------------------------------------------
PostgreSQL 7.4.6 on i386-portbld-freebsd5.3, compiled by GCC cc (GCC) 3.4.2 [FreeBSD] 20040728
(1 row)

Comments?

--
Fduch M. Pravking

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Shujun Huang 2005-02-14 13:37:23 BUG #1482: SQL ERROR IN 7.4.7
Previous Message alagu madhu 2005-02-14 10:21:08 BUG #1481: ERROR: type tablename does not exist