Thread: for integer/bigint type while format to scientific notation, automatically get the correct number of precision

Hi,

looking for the reverse of select '1.2923904e+07'::numeric::int;
every time, I have to select to_char(12923904,'9.9999999EEEE');
if I do select to_char(12923904,'9.999999EEEE');
then the result is different.

For integer or bigint can I automatically have something like: 
select to_char(int,'9.(precision-1)EEEE');


--
 I recommend David Deutsch's <<The Beginning of Infinity>>

  Jian