Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2]) by hub.org (8.9.3/8.9.3) with ESMTP id LAA21981; Tue, 22 Feb 2000 11:32:56 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id LAA23938; Tue, 22 Feb 2000 11:32:51 -0500 (EST) To: Jose Soares cc: hackers , general Subject: Re: [HACKERS] TRANSACTIONS In-reply-to: <38B27760.DB921B57@sferacarta.com> References: <38B27760.DB921B57@sferacarta.com> Comments: In-reply-to Jose Soares message dated "Tue, 22 Feb 2000 12:47:44 +0100" Date: Tue, 22 Feb 2000 11:32:51 -0500 Message-ID: <23935.951237171@sss.pgh.pa.us> From: Tom Lane Jose Soares writes: > ------------------------------------------------------- > Interbase, Oracle,Informix,Solid,Ms-Access,DB2: > ------------------------------------------------------- > connect hygea.gdb; > create table temp(a int); > insert into temp values (1); > insert into temp values (1000000000000000000000000000000000); > commit; > select * from temp; > arithmetic exception, numeric overflow, or string truncation > A > =========== > 1 > I would like to know what the Standard says and who is in the rigth path > PostgreSQL or the others, considering the two examples reported below. I think those other guys are unquestionably failing to conform to SQL92. 6.10 general rule 3.a says a) If SD is exact numeric or approximate numeric, then Case: i) If there is a representation of SV in the data type TD that does not lose any leading significant digits after rounding or truncating if necessary, then TV is that rep- resentation. The choice of whether to round or truncate is implementation-defined. ii) Otherwise, an exception condition is raised: data exception- numeric value out of range. and 3.3.4.1 says The phrase "an exception condition is raised:", followed by the name of a condition, is used in General Rules and elsewhere to indicate that the execution of a statement is unsuccessful, ap- plication of General Rules, other than those of Subclause 12.3, "", and Subclause 20.1, "", may be terminated, diagnostic information is to be made available, and execution of the statement is to have no effect on SQL-data or schemas. The effect on s and SQL descriptor areas of an SQL-statement that terminates with an exception condi- tion, unless explicitly defined by this International Standard, is implementation-dependent. I see no way that allowing the transaction to commit after an overflow can be called consistent with the spec. regards, tom lane