Re: Issue with past commit: Allow fractional input values for integer GUCs ...

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Issue with past commit: Allow fractional input values for integer GUCs ...
Дата
Msg-id 2945739.1598474863@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Issue with past commit: Allow fractional input values for integer GUCs ...  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Issue with past commit: Allow fractional input values for integer GUCs ...  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> I don't think any of these cases should be allowed. Surely if we
> allowed 384.234 to be inserted into an integer column, everyone would
> say that we'd lost our minds.

regression=# create table itable (f1 int);
CREATE TABLE
regression=# insert into itable values (384.234);
INSERT 0 1
regression=# table itable;
 f1  
-----
 384
(1 row)

It's always worked like that, and nobody's complained about it.
I suspect, in fact, that one could find chapter and verse in the
SQL spec that requires it, just like "numeric" values should get
rounded if you write too many digits.

            regards, tom lane



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Issue with past commit: Allow fractional input values for integer GUCs ...
Следующее
От: "Bossart, Nathan"
Дата:
Сообщение: Re: XMAX_LOCK_ONLY and XMAX_COMMITTED (fk/multixact code)