Received: from candle.pha.pa.us (maillist@s5-03.ppp.op.net [209.152.195.67]) by hub.org (8.9.3/8.9.3) with ESMTP id IAA58750 for ; Sun, 31 Oct 1999 08:19:37 -0500 (EST) (envelope-from maillist@candle.pha.pa.us) Received: (from maillist@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id IAA29940; Sun, 31 Oct 1999 08:18:31 -0500 (EST) From: Bruce Momjian Message-Id: <199910311318.IAA29940@candle.pha.pa.us> Subject: Re: [SQL] Decimal precsion? In-Reply-To: from Jan Wieck at "Oct 30, 1999 06:37:30 pm" To: Jan Wieck Date: Sun, 31 Oct 1999 08:18:31 -0500 (EST) CC: zot@zotconsulting.com, pgsql-sql@postgreSQL.org, jwieck@debis.com X-Mailer: ELM [version 2.4ME+ PL65 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit > > However, the original message had DECIMAL(4,4) and he could insert 0.1, > > but not 0.0. > > The rounding is of course correct. Rounding 0.1234567 first > to 0.123457 and then cutting of to 0.1234 is finally cutting, > not rounding, and totally braindead. You only have to look at > the digit after the last significant one. In this case we > have 4 significant digits, so we must look at digit 5, > nothing else. Thus 0.1234500 is 0.1235 while 0.1234499 is > 0.1234 - end of story. > > The other one, not beeing able to insert 0.0, is surely a > bug. Would you please put it onto the TODO? Done: * insert of 0.0 into DECIMAL(4,4) field fails -- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026