RE: [HACKERS] Numeric with '-'
От | Hiroshi Inoue |
---|---|
Тема | RE: [HACKERS] Numeric with '-' |
Дата | |
Msg-id | 000301bf7ce8$f77bb600$2801007e@tpf.co.jp обсуждение исходный текст |
Ответ на | Re: [HACKERS] Numeric with '-' (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: [HACKERS] Numeric with '-'
|
Список | pgsql-hackers |
> -----Original Message----- > From: Tom Lane [mailto:tgl@sss.pgh.pa.us] > > "Hiroshi Inoue" <Inoue@tpf.co.jp> writes: > > Hmm,this may be worse than before. > > INSERT/UPDATE statements would lose precision without > > telling any error/warnings. > > They didn't give any such warning before, either. I doubt I've > made anything worse. > Before your change INSERT into t (numdata) values (-1234567890.1234567); caused an error ERROR: Unable to convert left operator '-' from type 'unknown'. but currently inserts a constant -1234567890.12346. and INSERT into t (numdata) values (1234567890.1234567); inserted a numeric constant 1234567890.1234567 precisely but currently inserts a constant 1234567890.12346. > > Shouldn't decimal constants be distinguished from real constants ? > > Why? I don't see any particularly good reason for distinguishing > 1234567890.1234567890 from 1.2345678901234567890e9. (numeric_in > does accept both these days, BTW.) > According to a book about SQL92 which I have,SQL92 seems to recommend it. Hiroshi Inoue Inoue@tpf.co.jp
В списке pgsql-hackers по дате отправления: