Rounding Float Array

Поиск
Список
Период
Сортировка
От Alex Magnum
Тема Rounding Float Array
Дата
Msg-id CA+cR4zdMbw7p8ve5+N119thEpLvD_F5pyzOtBeB6Bi6Uh3rOAw@mail.gmail.com
обсуждение исходный текст
Ответы Re: Rounding Float Array
Re: Rounding Float Array
Re: Rounding Float Array
Список pgsql-general
Hello,

I have a float array holding geo location information.

              geoloc
-----------------------------------
 {5.3443133704554,100.29457569122}
 {5.3885574294704,100.29601335526}
 {3.1654978750403,101.60915851593}
 {5.3766154817748,100.31472444534}
 {3.1545014704258,101.70036971569}
(5 rows)

Is there an easy way to round all values to 4 decimals.

I can round the individual values and return them seperately but I need to return them as an array. 

  lat    |   long
---------+-----------
 5.34431 | 100.29458
 5.38856 | 100.29601
 3.16550 | 101.60916
 5.37662 | 100.31472
 3.15450 | 101.70037
(5 rows)

Any suggestion is highly appreciated.

Thanks
Alex

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

Предыдущее
От: Devrim GÜNDÜZ
Дата:
Сообщение: Re: looking for old rpm
Следующее
От: Chris Mair
Дата:
Сообщение: Re: Rounding Float Array