Tom Lane wrote:
Ok. Assuming,"Pedro M. Ferreira" <[EMAIL PROTECTED]> writes:int extra_float4_digits, default 0, min -4, max 2 int extra_float8_digits, defualt 0, min -13, max 2I think a single setting extra_float_digits would be sufficient.
int extra_float_digits, default 0, min -13, max 2
If extra_float_digits==-13 and we are outputing a float4 this results in a negative value for FLT_DIG+extra_float_digits. I dont know if sprintf's behaviour is the same across different libraries for this situation.
Should I include the following to handle this case ?
if(extra_float_digits<-4)
sprintf(ascii, "%.*g", FLT_DIG-4, num);
else
sprintf(ascii, "%.*g", FLT_DIG+extra_float_digits, num);
Also, if we concluded that there is a need of 2 more digits, should'nt this be the default ?
No. pg_dump would want to bump it up on-the-fly. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster
-- ---------------------------------------------------------------------- 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 ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]