不同的PostgreSQL时间戳可以相等吗?

时间:2016-08-31 02:33:45

标签: postgresql timestamp

有时候,我会看到ORDER BY date, id。为什么需要id

两个不同时期如何平等?

timestamp的精确度是多少?

2 个答案:

答案 0 :(得分:1)

你问过" ORDER BY date,id。"但随后提到时间戳。名为date的字段可能是时间戳类型或日期类似' YYYY / MM / DD'在这种情况下,按ID排序

答案 1 :(得分:1)

Since timestamps are discrete values there can be multiple timestamps with the same value regardless of the precision. The bigger the precision the least likely is a collision. An untie criteria is necessary if that is relevant.