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


00 is not a valid month number or day.



+10


source


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


What timestamp can a month or a day have 00

?

+2


source







All Articles