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 976D19DCBAB for ; Wed, 21 Dec 2005 09:56:31 -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 23057-03 for ; Wed, 21 Dec 2005 09:56:34 -0400 (AST) Received: from pgfoundry.org (pgfoundry.org [200.46.204.130]) by postgresql.org (Postfix) with ESMTP id 73E829DC9B3 for ; Wed, 21 Dec 2005 09:56:29 -0400 (AST) Received: from localhost (av.hub.org [200.46.204.144]) by pgfoundry.org (Postfix) with ESMTP id 796CD1125086; Wed, 21 Dec 2005 13:56:34 +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 19309-10; Wed, 21 Dec 2005 09:56:32 -0400 (AST) Received: by pgfoundry.org (Postfix, from userid 80) id C7D8E1125052; Wed, 21 Dec 2005 13:56:31 +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: <20051221135631.C7D8E1125052@pgfoundry.org> Date: Wed, 21 Dec 2005 13:56:31 +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.836 required=5 tests=[ALL_TRUSTED=-1.44, AWL=0.054, NO_REAL_NAME=0.55, SUBJECT_EXCESS_QP=0] X-Spam-Score: -0.836 X-Spam-Level: X-Archive-Number: 200512/289 X-Sequence-Number: 6768 Bugs item #1000495, was opened at 2005-12-21 07:27 You can respond by visiting: http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1000495&group_id=1000125 Category: None Group: None Status: Open 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 13:56 Message: Your fix works well for my needs. Thanks ---------------------------------------------------------------------- Comment By: Ludek Finstrle (luf) Date: 2005-12-21 12: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