Re: TIMESTAMP WITH( OUT)? TIME ZONE indexing/type choice...
От | Greg Stark |
---|---|
Тема | Re: TIMESTAMP WITH( OUT)? TIME ZONE indexing/type choice... |
Дата | |
Msg-id | 87k7fx4m61.fsf@stark.dyndns.tv обсуждение исходный текст |
Ответ на | Re: TIMESTAMP WITH( OUT)? TIME ZONE indexing/type choice... (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: TIMESTAMP WITH( OUT)? TIME ZONE indexing/type choice...
|
Список | pgsql-general |
Tom Lane <tgl@sss.pgh.pa.us> writes: > Greg Stark <gsstark@mit.edu> writes: > > The documentation I've read makes it sound like these two data types are > > equivalent in every way except for the default timezone assumed interpretation > > when converting to and from textual representations. Is that not true? > > I wouldn't think so. For example, you get dissimilar results near > daylight-savings-time boundaries: Well how is that different from just saying the timestamp is always in GMT? The confusing part is what happens when you cast from a timestamptz to a timestamp. It doesn't seem to adjust for the current time zone of the timestamptz, it just drops it. > timestamp just stores the nominal HH:MM:SS value you give it, with no sense > that it knows what time that really is, and no attempt to correct for > different local timezones nor for daylight-savings changes. Ok, I guess I understand now the difference between timestamp and timestamptz, I just don't see what use a timestamp that doesn't represent a particular time would ever be. It seems to serve only as a gotcha for unwary programmers who take the default. -- greg
В списке pgsql-general по дате отправления: