Re: Error on deleting - Mailing list pgadmin-support

From Indibil
Subject Re: Error on deleting
Date
Msg-id c4eqcj$2714$1@news.hub.org
Whole thread Raw
In response to Error on deleting  (Indibil <indibil@webmail.co.za>)
List pgadmin-support
Hi David:

I have another server with PostgreSQL 7.3 so,  I dumped the PostgreSQL 7.2
database and restored it in 7.3. With pgAdmin_II I get the same error when
I try to delete a record from the table "escritos". This table has a
primary key with two fields: "cod_ficha", "cod_estado". If, for example, I
select the records:

cod_ficha       cod_estado
------------    ---------------
2003000001      0001
2003000001      0023

When I try to delete only one of them, I get the message: "The selected
record could not be uniquely identified, 2 records match, and will all be
deleted if you proceed. Do you wish to continue?". 

The last lines in the pg_adminII.log are:
SELECT count(*) AS count FROM public.escritos WHERE cod_ficha=2003000001
DELETE public.escritos WHERE cod_ficha=2003000001

I think the problem is in the DELETE statement because the WHERE condition 
must be: ....... WHERE cod_ficha=2003000001 AND cod_estado='0023'

Whith pgAdmin III there is no problem on deleting because it issues the
following deleting statement:
DELETE public.escritos WHERE oid=169858256


Thanks a lot for your interest David,

Indibil


Dave Page wrote:

> It's rumoured that Indibil once said:
>> Hi:
>>
>> I have a PostgreSQL 7.2.2 database since 2 years working right until
>> now. When I try to delete a row from pgAdmin II , I get the message "
>> ....cannot uniquely identify, 2 rows match....." If I go on deleting
>> the row, the 2 ones are deleted. Of Course the 2 rows don't match. They
>> have different primary key, OIDs, and so on.
> 
> Hmm, can you re-create this with logging set to errors + sql please? Then
> send the logfile...
> Regards, Dave
> 
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend



pgadmin-support by date:

Previous
From: "Santhosh"
Date:
Subject: tips pls.
Next
From: "Dave Page"
Date:
Subject: Re: Error on deleting