Re: Date/Time atributes and binary cursors - Mailing list pgsql-interfaces

From Gonçalo Marrafa
Subject Re: Date/Time atributes and binary cursors
Date
Msg-id 20040406100403.3a60c461.gjm@uevora.pt
Whole thread Raw
In response to Re: Date/Time atributes and binary cursors  (L J Bayuk <ljb220@mindspring.com>)
Responses Re: Date/Time atributes and binary cursors  (Ryan Mooney <ryan@pcslink.com>)
List pgsql-interfaces
Thanks.

Do Postgres/libpq have functions for converting between Unix/Postgres date/time representations or do i have to do it
byhand? 

Thanks again.

> A date is returned as a 4-byte big-endian integer representing the number
> of days since POSTGRES_EPOCH_DATE.
> A timestamp is returned as an 8-byte big-endian double precision number of
> seconds since POSTGRES_EPOCH_DATE.
> A time is returned as an 8-byte big-endian double precision number of
> seconds since midnight.
> POSTGRES_EPOCH_DATE is January 1, 2000 (2000-01-01).
>
> Note that binary cursor results are in network data order (big-endian)
> starting with PostgreSQL-7.4 (versus native server order pre-7.4). This
> means they need to be byte-swapped if your client runs on an Intel-type
> little-endian system.
>


--
Gonçalo Marrafa <gjm@uevora.pt>

pgsql-interfaces by date:

Previous
From: L J Bayuk
Date:
Subject: Re: Date/Time atributes and binary cursors
Next
From: Ryan Mooney
Date:
Subject: Re: Date/Time atributes and binary cursors