Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de [53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id LAA12492 for ; Sat, 30 Oct 1999 11:53:30 -0400 (EDT) (envelope-from wieck@debis.com) Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-sql@postgreSQL.org id m11hafU-0003kLC; Sat, 30 Oct 99 17:43 MET DST Message-Id: From: wieck@debis.com (Jan Wieck) Subject: Re: [SQL] Decimal precsion? To: maillist@candle.pha.pa.us (Bruce Momjian) Date: Sat, 30 Oct 1999 17:43:48 +0200 (MET DST) Cc: zot@zotconsulting.com, pgsql-sql@postgreSQL.org, jwieck@debis.com Reply-To: wieck@debis.com (Jan Wieck) In-Reply-To: <199910300030.UAA25626@candle.pha.pa.us> from "Bruce Momjian" at Oct 29, 99 08:30:48 pm X-Mailer: ELM [version 2.4 PL25] Content-Type: text > > > > > Yeah I finnally figured that out, wish the docs would cover things like > > that. > > > > I went through two books (which said its just liek COBOL! and then > > ignored me) and finnally the mysql pages had a good right up. > > > > I still thing the 0.0 thing is an error. > > > > Yes, and why doesn't this generate an error: > > test=> insert into example values(0.12345); > INSERT 19488 1 > test=> insert into example values(0.1234567); > INSERT 19489 1 > test=> select * from example; > other > ------ > 0.1235 > 0.1235 > (2 rows) > > Jan, can you comment on this. I found the code in numeric.c, but can't > figure out what the proper test should be. Haven't seen the original message, but it looks to me that the column is declared as decimal with 4 digits after the decimal point. Therefore, all values get rounded at the time of INSERT/UPDATE. The above looks numerically right to me. Isn't that behaviour correct? Does the standard define something else? Jan -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #========================================= wieck@debis.com (Jan Wieck) #