Remix.run Logo
hexpeek 3 days ago

I expected there would be constraints, but the chosen range is quite intriguing. The PostgreSQL spec says the 4-byte date type spans 4713 BC to 5,874,897 AD. It gives much more headroom for future dates—did they assume preserving data before 4713 BC is unlikely?

bloak 3 days ago | parent [-]

That range of dates seems to correspond to (1UL << 31) days so I suspect they're using only 31 bits so I wonder why they didn't make it signed and extend it to 5,884,322 BC.