Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-jdbc by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group