Updated on 2022-08-16 GMT+08:00

Batch Dropping Objects

The batch drop operation allows you to drop multiple objects. This operation also applies to searched objects.

  • Batch drop is allowed only within a database.
  • An error is reported on batch dropping system objects, which cannot be dropped.

Perform the following steps to batch drop objects:

  1. Press Ctrl+left-click (select objects one by one) or Shift+left-click (select objects in a bunch) to select the objects to be dropped.
  2. Right-click and select Drop Objects.

    The Drop Objects tab displays the list of objects to be dropped.

    Column Name

    Description

    Example

    Type

    Displays information about the object type.

    Table, view

    Name

    Displays the object name.

    public.bs_operation_201804

    Query

    Displays the query that will be executed to drop objects.

    DROP TABLE IF EXISTS public.a123

    Status

    Displays the status of the drop operation.

    • To start: The drop operation has not been started.
    • In progress: The object is being dropped.
    • Completed: The drop operation has been completed.
    • Error: The object has not been dropped due to an error.
    • To start
    • In progress
    • Completed
    • Error

    Error Message

    Displays the failure cause of a drop operation.

    The table abc does not exist. Skip it.

  3. Select the required parameters.

    Option

    Description

    Cascade

    The cascade drop operation is performed to drop dependent objects and attributes. The dropped dependent objects will be removed from Object Browser only after the refresh operation is performed.

    Atomic

    The atomic drop operation is performed to drop all objects. If the operation fails, no objects will be dropped.

    No selection

    If neither Cascade nor Atomic is selected, no dependent objects are dropped.

  4. Click Start.

    Runs: displays the number of objects that are dropped from the object list

    Errors: displays the number of objects that are not dropped due to errors

  5. Click Stop or close the Drop Objects dialog box to stop the drop operation.

    For details about copy, advanced copy, show/hide search bar, sort, and column reorder options, see Executing SQL Queries.
    • Select part of a cell and press Ctrl+C or click to copy selected text in the cell.
    • When you select multiple objects in Object Browser to drop, a batch drop window is displayed and the object icons are enabled in the menu bar. If you disconnect the database, the icons will remain disabled even after reconnection. In this case, you need to reselect the objects to drop and the selected objects will be displayed in the new batch drop window.