X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 13F918B9B44 for ; Tue, 22 Feb 2005 16:59:47 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 31048-02 for ; Tue, 22 Feb 2005 16:59:40 +0000 (GMT) Received: from mail63.csoft.net (leary3.csoft.net [63.111.22.74]) by svr1.postgresql.org (Postfix) with SMTP id A9E9B8B9B16 for ; Tue, 22 Feb 2005 16:59:39 +0000 (GMT) Received: (qmail 27387 invoked by uid 1112); 22 Feb 2005 16:59:38 -0000 Date: Tue, 22 Feb 2005 11:59:38 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Nico Cc: pgsql-jdbc@postgresql.org Subject: Re: making a rule and know when it is violated In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.012 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200502/154 X-Sequence-Number: 12334 On Tue, 22 Feb 2005, Nico wrote: > What is the message returned by the sqlexception if such an index is > violated? I searched it on google.com, but didn't find much interesting, > probably using the wrong keywords... You could of course take the ten seconds necessary to try it: jurka=# create table ut (a int primary key); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "ut_pkey" for table "ut" CREATE TABLE jurka=# insert into ut values (1); INSERT 608266 1 jurka=# insert into ut values (1); ERROR: duplicate key violates unique constraint "ut_pkey" Kris Jurka