I sent an email before receiving the one below. I am happier also with
the extra_digits way (from the previous email I thought the options were
DBL_DIG or DBL_DIG+2).
> I'm not happy with adding the hex-output option, since it's not
> very portable and doesn't seem necessary to solve the problem anyway.
Agree.
> Perhaps something like
>
> extra_float_digits int range -2 to 2, default 0
>
> extra_float_digits adjusts the number of digits displayed for float4 and
> float8 output; the base value of 0 means we output FLT_DIG or DBL_DIG
> digits respectively.
Agree.
>
> Per discussion, there's no reason to allow a value greater than 2, but
> I'm not as sure what the lower limit should be --- maybe there's some
> use in setting it less than -2?
I could see some use. At least in my type of application. When people
are shure they only need p significant digits, they can set
extra_float_digits to an apropriate negative value and spare a lot in
storage for dumps and backups. In this case it would make sense to let
extra_float_digits go to -13.
Regards,
Pedro
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>
>
--
----------------------------------------------------------------------
Pedro Miguel Frazao Fernandes Ferreira
Universidade do Algarve
Faculdade de Ciencias e Tecnologia
Campus de Gambelas
8000-117 Faro
Portugal
Tel./Fax: (+351) 289 800950 / 289 819403
http://w3.ualg.pt/~pfrazao