PostgreSQL/JDBC and TIMESTAMP vs. TIMESTAMPTZ

前端 未结 3 1060
無奈伤痛
無奈伤痛 2021-02-02 10:50

I\'ve been going through a lot of pain dealing with Timestamps lately with JPA. I have found that a lot of my issues have been cleared up by using TIMESTAMPTZ for my fields inst

3条回答
  •  眼角桃花
    2021-02-02 11:26

    Update for the answers above: partitioning is no longer an exceptional case in PG11 thanks to pruning.

    https://www.postgresql.org/docs/11/ddl-partitioning.html#DDL-PARTITION-PRUNING

    Personally successfully tested queries against PG11 AWS RDS. Also the official PG wiki states the use of timestamp without timezone is a bad idea:

    https://wiki.postgresql.org/wiki/Don%27t_Do_This#Don.27t_use_timestamp_.28without_time_zone.29_to_store_UTC_times

提交回复
热议问题