Re: Behavior of CAST to integer

Поиск
Список
Период
Сортировка
От David G Johnston
Тема Re: Behavior of CAST to integer
Дата
Msg-id CAKFQuwaE48Jn-3pV5TZ3=f_uQm+9A_PHvtWfaeW+fHwcE-ixgA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Behavior of CAST to integer  (Gavin Flower <GavinFlower@archidevsys.co.nz>)
Список pgsql-novice
You need the floor operator:

​floor() behaves identically to trunc() for positive numbers only; for negative numbers floor() will round away from zero while trunc() rounds toward zero.​  ceil() or ceiling() has the same dual-behavior - though in reverse compared to floor() - for positive/negative numbers.

David J.



 


View this message in context: Re: Behavior of CAST to integer
Sent from the PostgreSQL - novice mailing list archive at Nabble.com.

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

Предыдущее
От: byron509
Дата:
Сообщение: Re: Behavior of CAST to integer
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Restrict number of connections to specific table