![]() |
|
|||||||
Ïðîäàì/Kóïëþ ãîòîâûé ñàéò
|
| Â |
|
Â
|
Îïöèè òåìû |
|
|
|
![]() |
Here’s the code that breaks production:
Let’s settle the debate: vs TIMESTAMPTZ (aka TIMESTAMP WITH TIME ZONE ) .
Chances are, you chose the wrong PostgreSQL temporal data type.
CREATE TABLE events ( id serial PRIMARY KEY, naive_timestamp timestamp, aware_timestamp timestamptz );
For 95% of applications, TIMESTAMPTZ is the correct choice. Its primary advantage is .
If you change your session time zone to 'Asia/Tokyo' (UTC+9) and read the table:
There are only a few valid use cases for TIMESTAMP WITHOUT TIME ZONE :
Here’s the code that breaks production:
Let’s settle the debate: vs TIMESTAMPTZ (aka TIMESTAMP WITH TIME ZONE ) .
Chances are, you chose the wrong PostgreSQL temporal data type.
CREATE TABLE events ( id serial PRIMARY KEY, naive_timestamp timestamp, aware_timestamp timestamptz );
For 95% of applications, TIMESTAMPTZ is the correct choice. Its primary advantage is .
If you change your session time zone to 'Asia/Tokyo' (UTC+9) and read the table:
There are only a few valid use cases for TIMESTAMP WITHOUT TIME ZONE :