Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U4fxZ-0004lE-8D for pgsql-bugs@arkaria.postgresql.org; Sun, 10 Feb 2013 23:05:21 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1U4fxY-0004Zj-Jg for pgsql-bugs@arkaria.postgresql.org; Sun, 10 Feb 2013 23:05:20 +0000 Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U4GzY-00013S-5d for pgsql-bugs@postgresql.org; Sat, 09 Feb 2013 20:25:44 +0000 Received: from [2001:4800:7903:4::123] (helo=mahout.postgresql.org) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U4GzV-0001tx-8F for pgsql-bugs@postgresql.org; Sat, 09 Feb 2013 20:25:43 +0000 Received: from [204.145.124.246] (helo=wrigleys.postgresql.org) by mahout.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U4GzT-0003Te-IR for pgsql-bugs@postgresql.org; Sat, 09 Feb 2013 20:25:40 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.72) (envelope-from ) id 1U4GzT-0005Q0-9a for pgsql-bugs@postgresql.org; Sat, 09 Feb 2013 20:25:39 +0000 Date: Sat, 09 Feb 2013 20:25:39 +0000 Message-Id: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #7865: Unexpected error code on insert of duplicate to composite primary key To: pgsql-bugs@postgresql.org From: matti.aarnio@methics.fi X-Host-Lookup-Failed: Reverse DNS lookup failed for 2001:4800:7903:4::123 (failed) X-Pg-Spam-Score: -1.1 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org The following bug has been logged on the website: Bug reference: 7865 Logged by: Matti Aarnio Email address: matti.aarnio@methics.fi PostgreSQL version: 9.2.2 Operating system: Fedora Linux 17/18 Description:=20=20=20=20=20=20=20=20 A table: CREATE TABLE example ( a TIMESTAMP NOT NULL, b VARCHAR(256) NOT NULL, c VARCHAR(256) NOT NULL, PRIMARY KEY(a,b,c)=20 ); Inserting a duplicate record on this is returning an SQL Error, but the status code is 0 instead of expected 23505. This used to work fine in 8.x series, but is now causing trouble in 9.1.7, and 9.2.3. My application filters by the status code to detect if the issue is really duplicate value, or some database service error. In a few cases we want to see "it is duplicate!" in order to allow an operation elsewhere. --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs