From: | Andreas Zeugswetter <andreas(dot)zeugswetter(at)telecom(dot)at> |
---|---|
To: | "'hackers(at)postgresql(dot)org'" <hackers(at)postgresql(dot)org> |
Subject: | float --> int |
Date: | 1998-05-11 08:16:20 |
Message-ID: | 01BD7CC5.DCCB1460@zeugswettera.user.lan.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Maurice wrote:
> Making an int from a float is only defined for "small" values of the float.
> So for the general case such a conversion would simply overflow the int,
> giving it an undefined value. Does this make sense to you?
This sure sounds good:
select (4.00000 !); -- would work, but
select (4.30000 !); -- would throw a runtime error like
ERROR: float to integer conversion error, value out of range.
Andreas
From | Date | Subject | |
---|---|---|---|
Next Message | t-ishii | 1998-05-11 09:18:38 | questionable codes in libpq/backend communication |
Previous Message | Maurice Gittens | 1998-05-11 07:44:51 | Re: [HACKERS] Automatic type conversion |