From: | Indibil <indibil(at)webmail(dot)co(dot)za> |
---|---|
To: | pgadmin-support(at)postgresql(dot)org |
Subject: | Re: Error on deleting |
Date: | 2004-03-31 16:07:42 |
Message-ID: | c4eqcj$2714$1@news.hub.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-support pgsql-general |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Page | 2004-04-01 11:45:01 | Re: Error on deleting |
Previous Message | Santhosh | 2004-03-31 12:24:04 | Fw: tips pls. |
From | Date | Subject | |
---|---|---|---|
Next Message | Julian North | 2004-03-31 16:17:45 | Re: select statement sorting |
Previous Message | Nick Barr | 2004-03-31 15:44:10 | Re: select statement sorting |