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

Re: "duplicate key value": version 8.4 vs 8.1

From: Kenneth Marshall <ktm(at)rice(dot)edu>
To: mountain oaf <mountainoaf(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: "duplicate key value": version 8.4 vs 8.1
Date: 2010-10-21 12:53:23
Message-ID: 20101021125323.GP4993@aart.is.rice.edu (view raw or flat)
Thread:
Lists: pgsql-novice
On Thu, Oct 21, 2010 at 10:59:50AM +1300, mountain oaf wrote:
> Hello,
> 
> I am a Postgres newbie using a C program to add records to a Postgres database.
> 
> When I run it against an 8.4.4 version of Postgres, data inserted into
> a table which violate an unique index are reported back to the program
> via sqlca.sqlcode as -403 ('duplicate key value violates unique
> constraint "my_index"').
> 
> However, when I run the same program against an 8.1.2 database, the
> error isn't trapped. I'm explicitly looking for a -403 code via
> sqlca.sqlcode so am assuming that the error code is different in this
> version of the database.
> 
> I've had a look on Teh Interwebs around to try and find out what the
> equivalent code is for 8.1.2 but have had no success so far. Could
> anyone point me in the right direction, please?
> 
> Thanks in advance for any assistance,
> 
> Mark
> 

Hi Mark,

You may want to try the latest version of 8.1, 8.1.22 or 20 bugfix
releases more current. As has been oft repeated here, they do not
release them for fun. They fix real and critical bugs.

Cheers,
Ken

In response to

Responses

pgsql-novice by date

Next:From: Mladen GogalaDate: 2010-10-21 19:42:46
Subject: Re: Incremental Backup
Previous:From: mountain oafDate: 2010-10-21 02:58:57
Subject: Re: "duplicate key value": version 8.4 vs 8.1

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