Re: BUG #5354: Type timestamptz doesn't allow to store time zone
Robert Haas wrote:
Vitali wrote:
When I select from the table, the timetz has the correct time
zone, the timestamptz has -6 as a time zone, which is my server
default.I'm not sure what you think the bug is, but timestamptz definitely
doesn't store the time zone in which the value is input. What it
does is makes input and output relative to the then-current time
zones rather than fixed wall-clock times.
We should probably add this to the FAQ -- the OP was expecting the
behavior specified by the standard, in which TIMESTAMP WITH TIME ZONE
includes a time zone.
-Kevin
Thank you for the response. I see your point. When I insert into field timezonetz it does convert into correct timezone and inserts the converted value. At the same time timestamp field just drops the timezone and inserts the value.
However, I think that confusion comes when timetz works differently. Are there any plans to make them work the same either one way or another.
Thanks,
Vitali
----- Original Message -----
From: "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
To: robertmhaas@gmail.com, vitali@lumensoftware.com
Cc: pgsql-bugs@postgresql.org
Sent: Tuesday, March 2, 2010 7:35:32 AM
Subject: Re: [BUGS] BUG #5354: Type timestamptz doesn't allow to store time zone
Robert Haas wrote:
Vitali wrote:
When I select from the table, the timetz has the correct time
zone, the timestamptz has -6 as a time zone, which is my server
default.I'm not sure what you think the bug is, but timestamptz definitely
doesn't store the time zone in which the value is input. What it
does is makes input and output relative to the then-current time
zones rather than fixed wall-clock times.
We should probably add this to the FAQ -- the OP was expecting the
behavior specified by the standard, in which TIMESTAMP WITH TIME ZONE
includes a time zone.
-Kevin
Import Notes
Reply to msg id not found: 1694054.23742.1267549553292.JavaMail.root@mail.lumensoftware.com | Resolved by subject fallback
Vitali Malinouski wrote:
Thank you for the response. I see your point. When I insert into
field timezonetz it does convert into correct timezone and
inserts the converted value. At the same time timestamp field
just drops the timezone and inserts the value.However, I think that confusion comes when timetz works differently.
Are there any plans to make them work the same either one way
or another.
I think we are following the specification on that one so I don't see
how we can change it.
---------------------------------------------------------------------------
----- Original Message ----- From: "Kevin Grittner"
<Kevin.Grittner@wicourts.gov> To: robertmhaas@gmail.com,
vitali@lumensoftware.com Cc: pgsql-bugs@postgresql.org Sent:
Tuesday, March 2, 2010 7:35:32 AM Subject: Re: [BUGS] BUG #5354:
Type timestamptz doesn't allow to store time zoneRobert Haas wrote:
Vitali wrote:
When I select from the table, the timetz has the correct time
zone, the timestamptz has -6 as a time zone, which is my server
default.I'm not sure what you think the bug is, but timestamptz definitely
doesn't store the time zone in which the value is input. What it
does is makes input and output relative to the then-current time
zones rather than fixed wall-clock times.We should probably add this to the FAQ -- the OP was expecting
the behavior specified by the standard, in which TIMESTAMP WITH
TIME ZONE includes a time zone.-Kevin
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
PG East: http://www.enterprisedb.com/community/nav-pg-east-2010.do