Joe Joe <fondwey@yahoo.com> writes:
> I expect the timestamp format to be a float8 type
> containing the seconds elapsed sind the 1.1.2000. This
> should roughly be something around 172668107, give and
> take a few timezone adjustments. What i get back from
> PQgetvalue is the following array of bytes:
> 0: 0x00
> 1: 0x00
> 2: 0x9d
> 3: 0x0a
> 4: 0x6d
> 5: 0x2e
> 6: 0x88
> 7: 0xc0
Looks to me like you are talking to a server that's using the
integer_datetimes build option, in which the timestamp format
is int8 not double, and the unit is microseconds.
regression=# select x'9d0a6d2e88c0'::int8;
int8
-----------------
172668107000000
(1 row)
regards, tom lane