Re: making a rule and know when it is violated

From: Kris Jurka <books(at)ejurka(dot)com>
To: Nico <nicohmail-postgresql(at)yahoo(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: making a rule and know when it is violated
Date: 2005-02-22 16:59:38
Message-ID: Pine.BSO.4.56.0502221158360.18576@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Brian Gunning 2005-02-22 17:15:47
Previous Message Nico 2005-02-22 16:33:20 Re: making a rule and know when it is violated