Re: Regarding feature #6367 "DROP DATABASE can now take the option FORCE ..."

From: Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: Regarding feature #6367 "DROP DATABASE can now take the option FORCE ..."
Date: 2023-06-13 10:29:05
Message-ID: CANxoLDd1n+h7rjmwQKoyiHozx43YSdnCmsNMhgzQH5yBbKbqdg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

On Tue, Jun 13, 2023 at 3:49 PM Dave Page <dpage(at)pgadmin(dot)org> wrote:

>
>
> On Tue, 13 Jun 2023 at 11:13, Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com>
> wrote:
>
>>
>>
>> On Tue, Jun 13, 2023 at 2:50 PM Dave Page <dpage(at)pgadmin(dot)org> wrote:
>>
>>>
>>>
>>> On Tue, 13 Jun 2023 at 09:36, Akshay Joshi <
>>> akshay(dot)joshi(at)enterprisedb(dot)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:
>>>>
>>>> [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.
>

So which option (Delete or Drop) should we use?

>
> --
> Dave Page
> Blog: https://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EDB: https://www.enterprisedb.com
>
>

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2023-06-13 10:53:22 Re: Regarding feature #6367 "DROP DATABASE can now take the option FORCE ..."
Previous Message Dave Page 2023-06-13 10:19:07 Re: Regarding feature #6367 "DROP DATABASE can now take the option FORCE ..."