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

Bug #502: Duplicate values in field with type primary key.

From: pgsql-bugs(at)postgresql(dot)org
To: pgsql-bugs(at)postgresql(dot)org
Subject: Bug #502: Duplicate values in field with type primary key.
Date: 2001-10-30 10:46:08
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
Alex Yemelyanov (alex(at)otdyh(dot)kz) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
Duplicate values in field with type primary key.

Long Description
There is a table, which keeps the last user's message on irc:

create table otdyh_last(
      nick varchar(100)primary key,
      message varchar(200),
      end_time integer

While user enters on channel, two queries is executed:
1. delete from otdyh_last where nick = 'some_nick'
2. insert into otdyh_last values('some_nick','',time_of_join)

Somehow there is 33 unique values in the table in the field nick(text of value 'Nurlan'), I noticed this when trying to make vacuum.
I do not use transactions(mode Autocommit in DBI).

Contact me on email please and I'll send all the necessary. 

Sample Code

No file was uploaded with this report

pgsql-bugs by date

Next:From: Andras BelokosztolszkiDate: 2001-10-30 13:47:12
Subject: Triggers cause backend crash
Previous:From: Lee KindnessDate: 2001-10-30 09:15:15
Subject: Re: ecpg - GRANT bug

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