public inbox for [email protected]  
help / color / mirror / Atom feed
From: Dave Page <[email protected]>
To: Akshay Joshi <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Subject: Re: Regarding feature #6367 "DROP DATABASE can now take the option FORCE ..."
Date: Tue, 13 Jun 2023 11:19:07 +0100
Message-ID: <CA+OCxozKQY=YnOxqK+S0phhOEDJ0VvgPzi7-ANs4c5XTDRNMuw@mail.gmail.com> (raw)
In-Reply-To: <CANxoLDdA82YUnpH28E-iFcy-nRroQVQbGzPok-n4EevX9w+hGQ@mail.gmail.com>
References: <CANxoLDe8jKs8GQN-69jM5SJV6URcJUsr80sG64BbDjUqeeibFQ@mail.gmail.com>
	<CA+OCxoz+QAjy_v_DihiJMf+ZsdoAVUaz0qw2NWwhCwBr5XA=cw@mail.gmail.com>
	<CANxoLDdA82YUnpH28E-iFcy-nRroQVQbGzPok-n4EevX9w+hGQ@mail.gmail.com>

On Tue, 13 Jun 2023 at 11:13, Akshay Joshi <[email protected]>
wrote:

>
>
> On Tue, Jun 13, 2023 at 2:50 PM Dave Page <[email protected]> wrote:
>
>>
>>
>> On Tue, 13 Jun 2023 at 09:36, Akshay Joshi <[email protected]>
>> 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:
>>>
>>> [image: 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.
>>
>>
>>>
>>>
>>> [image: 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,
>>
>     I mean apart from the Properties tab and Context menu, do I need to
> implement DROP DATABASE...WITH (FORCE)?
>
>
>> 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).
>>
>
>     I am not sure why we have used Delete/Drop, but for me, DROP seems
> appropriate as in the backend we used DROP Queries, so can we have
>     Drop
>     Drop (Cascade)
>     Drop (Force)
>

Because in the past people (I don't recall who) claimed that "Drop" was not
intuitive. I recall arguing that it's the standard SQL terminology, but
iirc we eventually settled on Delete/Drop, which is, frankly, messy.

-- 
Dave Page
Blog: https://pgsnake.blogspot.com
Twitter: @pgsnake

EDB: https://www.enterprisedb.com


Attachments:

  [image/png] Properties.png (13.9K, 3-Properties.png)
  download | view image

  [image/png] Context Menu.png (132.2K, 4-Context%20Menu.png)
  download | view image

view thread (8+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Regarding feature #6367 "DROP DATABASE can now take the option FORCE ..."
  In-Reply-To: <CA+OCxozKQY=YnOxqK+S0phhOEDJ0VvgPzi7-ANs4c5XTDRNMuw@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox