Re: making a rule and know when it is violated - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: making a rule and know when it is violated
Date
Msg-id Pine.BSO.4.56.0502221158360.18576@leary.csoft.net
Whole thread Raw
In response to Re: making a rule and know when it is violated  ("Nico" <nicohmail-postgresql@yahoo.com>)
List 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

pgsql-jdbc by date:

Previous
From: "Nico"
Date:
Subject: Re: making a rule and know when it is violated
Next
From: "Brian Gunning"
Date:
Subject: