Search Postgresql Archives

libpq -- reading a timestamp with time zone using binary format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



how does one determine whether libpq is sending an int64 or a double?

I see all of the #ifdefs in the source:

#ifdef HAVE_INT64_TIMESTAMP
static int64 time2t(const int hour, const int min, const int sec,
const fsec_t fsec);
#else
static double time2t(const int hour, const int min, const int sec,
const fsec_t fsec);
#endif


but it is still unclear (at least to me) how to determine as the
client whether the server has been compiled with the
HAVE_INT64_TIMESTAMP flag.

since both int64 and double use 8 bytes of storage on x86_64, you
can't determine the type using PQfsize.

Any suggestions would be appreciated.

-Whit

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux