X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 99BD49DCBD4 for ; Wed, 21 Dec 2005 10:17:43 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 24294-08 for ; Wed, 21 Dec 2005 10:17:47 -0400 (AST) Received: from pgfoundry.org (pgfoundry.org [200.46.204.130]) by postgresql.org (Postfix) with ESMTP id 5686B9DC809 for ; Wed, 21 Dec 2005 10:17:41 -0400 (AST) Received: from localhost (av.hub.org [200.46.204.144]) by pgfoundry.org (Postfix) with ESMTP id 901931125088; Wed, 21 Dec 2005 14:17:46 +0000 (GMT) Received: from pgfoundry.org ([200.46.204.130]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 25759-01; Wed, 21 Dec 2005 10:17:39 -0400 (AST) Received: by pgfoundry.org (Postfix, from userid 80) id 79E181125052; Wed, 21 Dec 2005 14:17:39 +0000 (GMT) To: noreply@pgfoundry.org From: Subject: =?UTF-8?Q?[_psqlodbc-Bugs-1000495_]_duplicate_key_causes_HY000_SQL-State?= Content-type: text/plain; charset=UTF-8 Message-Id: <20051221141739.79E181125052@pgfoundry.org> Date: Wed, 21 Dec 2005 14:17:39 +0000 (GMT) X-Virus-Scanned: by amavisd-new at hub.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=-0.835 required=5 tests=[ALL_TRUSTED=-1.44, AWL=0.055, NO_REAL_NAME=0.55, SUBJECT_EXCESS_QP=0] X-Spam-Score: -0.835 X-Spam-Level: X-Archive-Number: 200512/292 X-Sequence-Number: 6771 Bugs item #1000495, was opened at 2005-12-21 08:27 You can respond by visiting: http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1000495&group_id=1000125 Category: None Group: None >Status: Closed Resolution: Accepted Priority: 3 Submitted By: Tom Zschockelt (toz) Assigned to: Ludek Finstrle (luf) Summary: duplicate key causes HY000 SQL-State Initial Comment: while inserting a row into an table with primary key the current snapshot ( 8.01.01.05 ) returns a wrong sqlstate HY000 instead of the 8.01.01.02 driver which returns a 23005 sqlstate (which is correct) e.g. create table test1 ( field1 int2 primary key, field2 varchar(10) null ); insert into test1 (field1, field2) values ( 1, 'test'); insert into test1 (field1, field2) values ( 1, 'another test'); AFAIK the second insert should return with SQL_ERROR and sqlstate 23000 or 23005. ---------------------------------------------------------------------- Comment By: Tom Zschockelt (toz) Date: 2005-12-21 14:56 Message: Your fix works well for my needs. Thanks ---------------------------------------------------------------------- Comment By: Ludek Finstrle (luf) Date: 2005-12-21 13:36 Message: The 8.01.0102 driver returns 23505 sqlstate. I fix the problem in 8.01.0105. I attach working DLLs. Please try and report if it's ok or not ok. ---------------------------------------------------------------------- You can respond by visiting: http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1000495&group_id=1000125