Re: UUID v7 - Mailing list pgsql-hackers

From Aleksander Alekseev
Subject Re: UUID v7
Date
Msg-id CAJ7c6TPZZg8uM+2=Hj_s-gcvYCfYo=8ABZPTBvvh=mkCdRot9Q@mail.gmail.com
Whole thread Raw
In response to Re: UUID v7  (Przemysław Sztoch <przemyslaw@sztoch.pl>)
Responses Re: UUID v7
Re: UUID v7
List pgsql-hackers
Hi,

> Another question: how did you choose between using TimestampTz and
> Timestamp types? I realize that internally it's all the same. Maybe
> Timestamp will be slightly better since the way it is displayed
> doesn't depend on the session settings. Many people I talked to find
> this part of TimestampTz confusing.
>
> timstamptz internally always store UTC.
> I believe that in SQL, when operating with time in UTC, you should always use timestamptz.
> timestamp is theoretically the same thing. But internally it does not convert time to UTC and will lead to incorrect
use.

No.

Timestamp and TimestampTz are absolutely the same thing. The only
difference is how they are shown to the user. TimestampTz uses session
context in order to be displayed in the TZ chosen by the user. Thus
typically it is somewhat more confusing to the users and thus I asked
whether there was a good reason to choose TimestampTz over Timestamp.

-- 
Best regards,
Aleksander Alekseev



pgsql-hackers by date:

Previous
From: Bertrand Drouvot
Date:
Subject: Re: Fix race condition in InvalidatePossiblyObsoleteSlot()
Next
From: Jeevan Chalke
Date:
Subject: Re: More new SQL/JSON item methods