Re: Question about integer out of range in function
| От | Tom Lane |
|---|---|
| Тема | Re: Question about integer out of range in function |
| Дата | |
| Msg-id | 1883415.1621003343@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Question about integer out of range in function (Condor <condor@stz-bg.com>) |
| Ответы |
Re: Question about integer out of range in function
Re: Question about integer out of range in function |
| Список | pgsql-general |
Condor <condor@stz-bg.com> writes:
> new_time = fromtime * 1000; -- here is line 19
Are you entirely certain that you counted lines correctly?
If new_time and fromtime are both declared bigint, and
fromtime is on the order of
# select extract(epoch from now())::bigint;
extract
------------
1621003124
(1 row)
then there's no way that that statement fails on integer overflow.
What I'm wondering about is the next line:
> unix_time = (new_time + rand_int)::BIGINT;
You've not shown us the declaration of unix_time ...
regards, tom lane
В списке pgsql-general по дате отправления: