HomeMogDBMogDB StackUqbar
v5.0

Documentation:v5.0

Supported Versions:

DROP DATA SOURCE

Function

DROP DATA SOURCE deletes a data source.

Important Notes

Only an owner, system administrator, or initial user can delete a data source.

Syntax

DropDataSource ::= DROP DATA SOURCE [IF EXISTS] src_name [CASCADE | RESTRICT];

Parameter Description

  • src_name

    Specifies the name of the data source to be deleted.

    Value range: a string. It must comply with the naming convention.

  • IF EXISTS

    Reports a notice instead of an error if the specified data source does not exist.

  • CASCADE | RESTRICT

    • CASCADE: automatically deletes the objects that depend on the data source.

    • RESTRICT: refuses to delete the data source if any objects depend on it. This is the default action.

      Currently, no objects depend on data sources. Therefore, CASCADE is equivalent to RESTRICT, and they are reserved to ensure backward compatibility.

Examples

-- Create a data source.
MogDB=# CREATE DATA SOURCE ds_tst1;

-- Delete the data source.
MogDB=# DROP DATA SOURCE ds_tst1 CASCADE;
MogDB=# DROP DATA SOURCE IF EXISTS ds_tst1 RESTRICT;

CREATE DATA SOURCE and ALTER DATA SOURCE

Copyright © 2011-2024 www.enmotech.com All rights reserved.