| От | Ian Pilcher |
|---|---|
| Тема | Cast double precision to integer & check for overflow |
| Дата | |
| Msg-id | ke1gtm$jbk$1@ger.gmane.org обсуждение |
| Ответы |
Re: Cast double precision to integer & check for overflow
|
| Список | pgsql-general |
I need to cast a double precision into an integer, and I want to check that the value will actually fit (modulo rounding). Coming from a C/Java background, this seems like something that should be utterly trivial. In my searching, however, I can't seem to find any SQL equivalent of INT_MAX, Integer.MAX_VALUE, etc. Do I have to hard-code this value? Thanks! (And yes, I do feel stupid having to ask this question here.) -- ======================================================================== Ian Pilcher arequipeno@gmail.com Sometimes there's nothing left to do but crash and burn...or die trying. ========================================================================
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера