I want to store date like "247530526765-12-27" in DB. But I am getting the following error IO Error pq: date/time field value out of range: "247530526765-12-27"
I understand the year field of my date is too odd. But still I want to know whether it is possible. If yes, how do I increase the maximum range of DATE.
Postgres's date
type is only 4 bytes wide, so it can't store anything beyond the year 5874897. There is not a way to increase it.
With a little work in your client, you could store the date in a wide numeric type like a bigint
as "days from epoch" or something similar. Or you could always serialize the date to a string.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With