binary representation of date and numeric

Started by fkater@googlemail.comalmost 19 years ago2 messagesgeneral
Jump to latest
#1fkater@googlemail.com
fkater@googlemail.com

Hi,

what is the binary representation of 'date' and 'numeric' data?

I am using PQexecParam (C binding libpq-8.0.12) with binary export
switched on. From the three examples in C code the types 'int4', 'bytea'
and strings are covered, however nothing about 'date', 'numeric'.

If there is no documentation and I need to examine the sources, could
anyone point me to the needed files or sections?

Thank You

Felix

#2Richard Huxton
dev@archonet.com
In reply to: fkater@googlemail.com (#1)
Re: binary representation of date and numeric

Felix Kater wrote:

Hi,

what is the binary representation of 'date' and 'numeric' data?

I am using PQexecParam (C binding libpq-8.0.12) with binary export
switched on. From the three examples in C code the types 'int4', 'bytea'
and strings are covered, however nothing about 'date', 'numeric'.

If there is no documentation and I need to examine the sources, could
anyone point me to the needed files or sections?

You'll want to look in src/backend/utils/adt. Note that timestamps can
be compiled as floating-pt representations or int64, so you probably
want to check whether that has any impact on dates.

--
Richard Huxton
Archonet Ltd