Bug #502: Duplicate values in field with type primary key. - Mailing list pgsql-bugs

From pgsql-bugs@postgresql.org
Subject Bug #502: Duplicate values in field with type primary key.
Date
Msg-id 200110301046.f9UAk8Z82382@postgresql.org
Whole thread Raw
List pgsql-bugs
Alex Yemelyanov (alex@otdyh.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
makevacuum. 
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:

Previous
From: Lee Kindness
Date:
Subject: Re: ecpg - GRANT bug
Next
From: Tom Lane
Date:
Subject: Re: Porting issue with openssl and no /dev/random