Re: Regarding feature #6367 "DROP DATABASE can now take the option FORCE ..." - Mailing list pgadmin-hackers

From Dave Page
Subject Re: Regarding feature #6367 "DROP DATABASE can now take the option FORCE ..."
Date
Msg-id CA+OCxoz+QAjy_v_DihiJMf+ZsdoAVUaz0qw2NWwhCwBr5XA=cw@mail.gmail.com
Whole thread Raw
In response to Regarding feature #6367 "DROP DATABASE can now take the option FORCE ..."  (Akshay Joshi <akshay.joshi@enterprisedb.com>)
Responses Re: Regarding feature #6367 "DROP DATABASE can now take the option FORCE ..."
List pgadmin-hackers


On Tue, 13 Jun 2023 at 09:36, Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:
Hi Hackers

I have started the implementation for feature #6367 "DROP DATABASE can now take the option FORCE to drop a database even if other users are connected".

For that, I figure out two places one in the Properties tab of the Databases collection node and the other in the context menu on the individual database node except the maintenance database. This feature will be available from PG 13 and above. Please refer to the screenshot below:

Properties.png   The 'Drop with Force' button is visible only on the Databases collection node. For other collection nodes, it is a 'Drop Cascade'.

Right, because CASCADE means drop dependent objects as well, but FORCE means disconnect connected users first.
 


Context Menu.png 

Please review and let me know your thoughts. Is there any place where I can use this? 

I'm not sure what you mean with your last question, but I think the wording needs some thought. Currently we have:

Delete/Drop
Drop Cascade
Delete/Drop with Force

I would suggest:

Delete
Delete (Cascade)
Delete (Force)

And we should probably re-order the menu to place those options together (and make sure the confirmation dialogues have appropriately matching text).

--
Attachment

pgadmin-hackers by date:

Previous
From: Akshay Joshi
Date:
Subject: Regarding feature #6367 "DROP DATABASE can now take the option FORCE ..."
Next
From: Sahil Harpal
Date:
Subject: Pgadmin4 System Stats Extension Design