>>>>> "JD" == Jeff Davis <pg...@j-davis.com> writes:

JD> 2. Fix the input/output functions in a special mode for dump/reload,
JD> to make them true inverses.

JC> That can be done by supporting the %A printf(3)/scanf(3) format.

JD> I don't happen to see a %A format in the man page, but I doubt the
JD> output would look like a timestamp.

Modern printf(1) also supports it, so an easy example:

:; printf '%A\n' 3.1415926535897932384626433832795029
0XC.90FDAA22168C235P-2

%a is the same, but with miniscule letters.

It is the hex format of the float types, and defaults to exactly enough
precision.  The length modifier L makes %a expect a long double.

JD> And if it doesn't look like a timestamp, it violates the spirit of a
JD> logical dump of the data.

Point taken.  Had I read the whole thread before replying I would have
been reminded that the float timestamps were archaic; that avoids any
need of %A for timestamps.

That said, the possiblity of hex i/o format for the float datatypes
would be welcome.

-JimC
-- 
James Cloos <cl...@jhcloos.com>         OpenPGP: 1024D/ED7DAEA6

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

Reply via email to