Re: Delete icon deletes all records in pgadmin

From: Dave Page <dpage(at)postgresql(dot)org>
To: Oliver Baden <obaden(at)olit(dot)de>
Cc: pgadmin-support(at)postgresql(dot)org
Subject: Re: Delete icon deletes all records in pgadmin
Date: 2007-01-05 09:39:18
Message-ID: 459E1CC6.7050303@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Oliver Baden wrote:
> Hi!
>
> I have a table where the primary key is a serial but the position of the
> primary key is not the first column. Today when showing all recordsets
> with the command "show all rows" (in german: alle Zeilen anzeigen) I
> wanted to delete one row and selected it with the mouse and after that
> clicked the delete-icon. After a table-refresh all rows had been deleted
> and I had to restore the table from our backup. I tried the same
> behaviour in pgadmin 1.40 and it worked without a problem. So for me
> pgadmin 1.61 behaves as if the table has no primary-key assigned when
> the primary-key column is not the first column of the table and can not
> build the where-statement for the delete-command properly. Has somebody
> else seen this behaviour?

I'm sorry that you've lost data :-(

I've been testing this with a copy of pg_class, in which I used
relfilenode as a primary key and couldn't reproduce the problem. I then
changed the primary key to be relfilenode and relisshared
(non-consecutive columns, neither of which are at the beginning or end)
and that worked as expected as well.

Can you still reproduce the problem (on a test database of course!). If
so, can you share the table definition please?

Thanks, Dave.

In response to

Browse pgadmin-support by date

  From Date Subject
Next Message Mike G 2007-01-05 18:30:08 Re: Infinite loop occurs sometimes when exporting
Previous Message Dave Page 2007-01-05 09:22:23 Re: Infinite loop occurs sometimes when exporting