| From: | Samantha Atkins <sjatkins(at)mac(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: what is the date format in binary query results |
| Date: | 2007-12-12 07:14:51 |
| Message-ID: | BE3FFB6D-057B-4802-91C2-050559592ADA@mac.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
This brings up a second question. How should I do byte order
conversion for 8 byte ints? I can't use hton ntoh routines as they
max out at 32 bits. Is there a better way? Also, are floating point
numbers guaranteed uniform?
If any one knows a a clean code example of binary binding of
parameters and binary extraction of results for all major types in C
against lippq that would be a very useful thing to have in the
standard docs.
- samantha
On Nov 8, 2007, at 7:18 AM, Tom Lane wrote:
> Samantha Atkins <sjatkins(at)mac(dot)com> writes:
>> What can I expect for a date format from a PGresult containing binary
>> results? Specifically the Oid type is TIMESTAMPTZOID.
>
> It's either an int8 representing microseconds away from 2000-01-01
> 00:00:00 UTC, or a float8 representing seconds away from the same
> origin.
>
> regards, tom lane
- samantha
Vote Ron Paul for President in 2008 -- Save Our Constitution!
Go to RonPaul2008.com, and search "Ron Paul" on YouTube
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Samantha Atkins | 2007-12-12 07:18:39 | Re: what is the date format in binary query results |
| Previous Message | Tom Lane | 2007-12-12 07:01:03 | Re: RETURNING clause: how to specifiy column indexes? |