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

Поиск
Список
Период
Сортировка
От jian he
Тема for integer/bigint type while format to scientific notation, automatically get the correct number of precision
Дата
Msg-id CACJufxHcBYmC=7W=05gbEkxU7WAygSr4_U=2AH2YWOVBp23KpA@mail.gmail.com
обсуждение исходный текст
Список pgsql-general
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


В списке pgsql-general по дате отправления:

Предыдущее
От: Jan Bilek
Дата:
Сообщение: Re: PCI:SSF - Safe SQL Query & operators filter
Следующее
От: Cedric Aaron Towstyka
Дата:
Сообщение: Information to CVE-2022-42889