Why is PostgreSQL complaining about the "0000-00-00 00:00:00" timestamp?
In the Postgres Manual of Date / Time, the type timestamp
can go back from 4713 BC. up to bazillion in the future. So why is Pg complaining that "0000-00-00 00:00:00" is not a valid timestamp?
+3
source to share
3 answers
You may be thinking:
'allballs'::time
This is the same as:
'00:00:00'::time
Works for data type time
, but not for timestamp
.
If you're looking for the lowest possible timestamp value , use:
'-infinity'::timestamp
What is for documentation ...
before all other time stamps
+5
source to share