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

Re: Multiple selections delete bug

From: "Virgil Frum" <virgil(at)netappi(dot)com>
To: <pgadmin-support(at)postgresql(dot)org>
Subject: Re: Multiple selections delete bug
Date: 2004-10-06 13:37:22
Message-ID: 002f01c4aba9$9c39e880$310210ac@virgil (view raw or flat)
Thread:
Lists: pgadmin-support
The problem is just partially resolved. I've made some new tests (on oct 05
release) and looked over changes you've made in src/ui/frmEditGrid.cpp.
Conclusion: deletion is working correctly only if rows are selected in
ascending or descending order with or without gaps. Selecting rows in an
arbitrary order (ex. 7, 8, 9, 4, 5, 6) won't work.

Method sqlTable::DeleteRows(size_t pos, size_t rows) is working correctly
only on successively rows. So, I see 2 possible solutions (with DeleteRows()
unchanged):
1) order ascending 'delrows' array (wxArrayInt from frmEditGrid::OnDelete -
line 498) and remove lines added in version 1.56
2) call  sqlGrid->GetSelectedRows() after every
sqlGrid->DeleteRows(delrows.Item(0), 1);

I'm sorry for insistence, but I want to avoid deletion of wrong lines.

Regards,
Virgil

>> When multiple rows are selected (in Edit Data window) from
>> bottom to top and Delete button is pressed then either the
>> program crashes or wrong rows are deleted.
>>
>
> Thanks. I've committed a fix for this to CVS.
>
> Regards, Dave.


In response to

pgadmin-support by date

Next:From: Dave PageDate: 2004-10-06 13:43:22
Subject: Re: Multiple selections delete bug
Previous:From: Andreas PflugDate: 2004-10-06 09:24:33
Subject: Re: Cannot add non-null columns

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