I've read that PostgreSQL internally stores timestamps as an 8-byte/64-bit integer.
To check this I've created a table, inserted some timestamps and queried the heap_page_items
.
The output e.g. for timestamp 2019-01-08 09:00:00
was 00 e4 c2 56 ed 21 02 00
.
Given this hex sequence, how do I manually compute the number of microseconds since PostgreSQL epoch (2000-01-01)? Using a timestamp converter I got value 600253200000
as result. How do I have to "unpack" the bytes to receive this value?