Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux