当前位置:网站首页>Gbase 8C - SQL reference 6 SQL syntax (9)
Gbase 8C - SQL reference 6 SQL syntax (9)
2022-07-27 05:56:00 【aisirea】
Function description
Remove a domain .
Grammar format
DROP DOMAIN [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]
Parameter description
- IF EXISTS: If the domain does not exist , No error, just prompt ;
- name: Name of existing domain , Can be modified by patterns ;
- CASCADE: Automatically delete objects that depend on this domain ( Such as table ), And all objects that depend on those objects ;
- RESTRICT: If any object depends on this domain , Then refuse to delete , This is the default setting .
matters needing attention
Only the owner of the domain can remove the domain .
Example
DROP DOMAIN us_postal_code;
DROP DOMAIN
Grammar compatible
except IF EXISTS Options , This command conforms to SQL standard .IF EXISTS It's a PostgreSQL Expand .
Related to the grammar
Function description
Remove an extension .
Grammar format
DROP EXTENSION [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]
Parameter description
- IF EXISTS: If the extension does not exist , No error, just prompt ;
- name: The name of the installed extension ;
- CASCADE: Automatically delete objects that depend on this extension , And all objects that depend on those objects ;
- RESTRICT: If any object depends on that object , Then refuse to delete , This is the default setting .
matters needing attention
Only the owner of the extension can remove the extension .
Example
DROP EXTENSION hstore;
DROP EXTENSION
Grammar compatible
DROP EXTENSION It's a PostgreSQL Expand .
Related to the grammar
CREATE EXTENSION, ALTER EXTENSION
Function description
Delete a function .
Grammar format
DROP FUNCTION [ IF EXISTS ] name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ] [, ...]
[ CASCADE | RESTRICT ]
Parameter description
- IF EXISTS: If the function doesn't exist , No error, just prompt ;
- name: Name of existing function , Can be modified by patterns ;
- argmode: Mode of function parameters , Value range :IN、OUT、INOUT perhaps VARIADIC, Default is IN;
- argname: The name of the function parameter , Value range : character string ;
- argtype: The data type of the function parameter ;
- CASCADE: Automatically delete objects that depend on this function ( Such as operators and triggers ), And all objects that depend on those objects ;
- RESTRICT: If any object depends on this function , Then refuse to delete , This is the default setting .
matters needing attention
Only the owner of the function can remove the function .
The parameter type of the function must be specified , Because different functions may have the same name and different parameter lists .
Example
DROP FUNCTION func_get(integer);
DROP FUNCTION
Grammar compatible
This command complies with SQL standard .
Related to the grammar
CREATE FUNCTION, ALTER FUNCTION
Function description
Remove a database role .
Grammar format
DROP GROUP [ IF EXISTS ] name [, ...]
Parameter description
Reference resources DROP ROLE Parameter description of .
matters needing attention
DROP GROUP yes DROP ROLE Another name for .
Grammar compatible
stay SQL There is no in the standard DROP GROUP sentence .
Related to the grammar
Function description
Remove an index .
Grammar format
DROP INDEX [ CONCURRENTLY ] [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]
Parameter description
- CONCURRENTLY: Delete the index without locking . When deleting an index , Generally, other statements will block access to the table that the index depends on . Add this keyword , It can realize that there is no blocking in the deletion process . This option can only specify the name of one index , also CASCADE Option does not support . Ordinary DROP INDEX Commands can be executed within a transaction , however DROP INDEX CONCURRENTLY Cannot execute within a transaction ;
- IF EXISTS: If the index does not exist , No error, just prompt ;
- name: The name of the index to be removed , Can be modified by patterns ;
- CASCADE: Automatically delete objects that depend on the index , And all objects that depend on those objects ;
- RESTRICT: If any object depends on the index , Then refuse to delete , This is the default setting .
matters needing attention
Only the owner of the index can remove the index .
Example
DROP INDEX customer_idx;
DROP INDEX
Grammar compatible
DROP INDEX It's a PostgreSQL Language extension . stay SQL Index is not provided in the standard .
Related to the grammar
Function description
Remove a language .
Grammar format
DROP [ PROCEDURAL ] LANGUAGE [ IF EXISTS ] name [ CASCADE | RESTRICT ]
Parameter description
- IF EXISTS: If the language does not exist , No error, just prompt ;
- name: The name of the existing language , You can use single quotation marks ;
- CASCADE: Automatically delete objects that depend on the index ( For example, functions in this language ), And all objects that depend on those objects ;
- RESTRICT: If any object depends on the language , Then refuse to delete , This is the default setting .
matters needing attention
Only the owner of the language can remove the language .
Example
DROP LANGUAGE plsample;
Grammar compatible
stay SQL There is no in the standard DROP LANGUAGE sentence .
Related to the grammar
ALTER LANGUAGE, CREATE LANGUAGE
Function description
Remove a materialized view .
Grammar format
DROP MATERIALIZED VIEW [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]
Parameter description
- IF EXISTS: If the materialized view does not exist , No error, just prompt ;
- name: The name of the materialized view to be removed , Can be modified by patterns ;
- CASCADE: Automatically delete objects that depend on the materialized view ( For example, other materialized views or general views ), And all objects that depend on those objects ;
- RESTRICT: If any object depends on the materialized view , Then refuse to delete , This is the default setting .
matters needing attention
Only the owner of the materialized view can remove it .
Example
DROP MATERIALIZED VIEW mv_customer;
DROP MATERIALIZED VIEW
Grammar compatible
DROP MATERIALIZED VIEW It's a PostgreSQL Expand .
Related to the grammar
CREATE MATERIALIZED VIEW, ALTER MATERIALIZED VIEW, REFRESH MATERIALIZED VIEW
Function description
Remove node . This interface is not recommended for users to use directly , So as not to affect the status of the cluster .
Grammar format
DROP NODE nodename
Parameter description
- nodename: Name of the node to be deleted .
matters needing attention
DROP NODE It is the internal interface encapsulated by the cluster management tool , Used to realize cluster management . This interface is not recommended for users to use directly , So as not to affect the status of the cluster .
Grammar compatible
DROP NODE Not the standard SQL grammar .
Related to the grammar
Function description
Delete node group . This interface is not recommended for users to use directly , So as not to affect the status of the cluster .
Grammar format
DROP NODE GROUP groupname
Parameter description
- groupname: The node group name to delete .
matters needing attention
DROP NODE GROUP It is the internal interface encapsulated by the cluster management tool , Used to realize cluster management . This interface is not recommended for users to use directly , So as not to affect the status of the cluster .
Grammar compatible
DROP NODE GROUP Not the standard SQL grammar .
Related to the grammar
Function description
Remove an operator .
Grammar format
DROP OPERATOR [ IF EXISTS ] name ( { left_type | NONE } , { right_type | NONE } ) [, ...] [ CASCADE | RESTRICT ]
Parameter description
- IF EXISTS: If the operator does not exist , No error, just prompt ;
- name: Name of existing operator , Can be modified by patterns ;
- left_type: The left operand of this operator ( If there is ) Data type of , By default, it can be written as NONE;
- right_type: The right operand of this operator ( If there is ) Data type of , By default, it can be written as NONE;
- CASCADE: Automatically delete objects that depend on this operator ( For example, use its view ), And all objects that depend on those objects ;
- RESTRICT: If any object depends on this operator , Then refuse to delete , This is the default setting .
matters needing attention
Only the owner of the operator can delete the operator .
Example
DROP OPERATOR ^ (integer, integer);
Grammar compatible
SQL There is no in the standard DROP OPERATOR sentence .
Related to the grammar
边栏推荐
- 2021中大厂php+go面试题(1)
- Day 4.Social Data Sentiment Analysis: Detection of Adolescent Depression Signals
- GBase 8c产品简介
- Cap principle
- Numpy基础学习
- Public opinion & spatio-temporal analysis of infectious diseases literature reading notes
- Mysql和Redis如何保证数据一致性
- GBASE 8C——SQL参考6 sql语法(4)
- Minio分片上传解除分片大小限制 - chunk size must be greater than 5242880
- vscode打造golang开发环境以及golang的debug单元测试
猜你喜欢

Mysql分组后时并行统计数量

The LAF protocol elephant of defi 2.0 may be one of the few profit-making means in your bear market

minio8.x版本设置policy桶策略

5.索引和切片

DDD领域驱动设计笔记

【并发编程系列9】阻塞队列之PriorityBlockingQueue,DelayQueue原理分析

Global evidence of expressed sentimental alterations during the covid-19 pandemics

13.逻辑回归

12.优化问题实战

Deploy redis with docker for high availability master-slave replication
随机推荐
GBASE 8C——SQL参考4 字符集支持
Day 17.The role of news sentiment in oil futures returns and volatility forecasting
NFT new opportunity, multimedia NFT aggregation platform okaleido will be launched soon
14.实例-多分类问题
17.动量与学习率的衰减
Dimitra and ocean protocol interpret the secrets behind agricultural data
Seektiger's okaleido has a big move. Will the STI of ecological pass break out?
RK3288板卡HDMI显示uboot和kernel的logo图片
数字图像处理——第九章 形态学图像处理
golang怎么给空结构体赋值
How MySQL and redis ensure data consistency
Day 9. Graduate survey: A love–hurt relationship
如果面试官问你 JVM,额外回答“逃逸分析”技术会让你加分
Es time query error - "caused_by": {"type": "illegal_argument_exception", "reason": "failed to parse date field
Day 6. Analysis of the energy transmission process of network public opinion in major medical injury events * -- Taking the "Wei Zexi incident" as an example
数字图像处理第四章——频率域滤波
常用adb命令汇总 性能优化
Fortex Fangda releases the electronic trading ecosystem to share and win-win with customers
身为技术管理者应该具备的素质(猜想)
数字图像处理 第二章 数字图像基础