检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
EXEC SQL INSERT INTO foo VALUES (5, 'abc'); Delete a row. EXEC SQL DELETE FROM foo WHERE a = 5; Update table data. EXEC SQL UPDATE foo SET b = 'gdp' WHERE a = 7; Query data in a single row.
EXEC SQL INSERT INTO foo VALUES (5, 'abc'); Delete a row. EXEC SQL DELETE FROM foo WHERE a = 5; Update table data. EXEC SQL UPDATE foo SET b = 'gdp' WHERE a = 7; Query data in a single row.
If an LSN-based logical replication slot remains on the current CN and a CSN-based logical replication slot with the same name remains on other nodes, connecting to a CN to delete a replication slot will delete only the local LSN-based logical replication slot.
RESTRICT Refuses to delete the rule if any objects depend on it. The default value is used.
RESTRICT Refuses to delete the sequence if any objects depend on it. This is the default action.
RESTRICT: refuses to delete the schema if the schema contains objects. This is the default action. Schemas beginning with pg_temp or pg_toast_temp are for internal use. Do not delete them. Otherwise, unexpected consequences may be incurred.
RESTRICT: refuses to delete the schema if the schema contains objects. This is the default action. Schemas beginning with pg_temp or pg_toast_temp are for internal use. Do not delete them. Otherwise, unexpected consequences may be incurred.
If command is set to DELETE, only tuple data that meets the condition (the return value of using_expression is TRUE) can be deleted. The operations that are affected include DELETE and DELETE ... RETURNING.
If command is set to DELETE, only tuple data that meets the condition (the return value of using_expression is TRUE) can be deleted. The operations that are affected include DELETE and DELETE ... RETURNING.
WHERE id1=OLD.id1; RETURN OLD; END $$ LANGUAGE plpgsql; -- Create a DELETE trigger. gaussdb=# CREATE TRIGGER delete_trigger BEFORE DELETE ON test_trigger_src_tbl FOR EACH ROW EXECUTE PROCEDURE tri_delete_func(); -- Execute the DELETE event
If an LSN-based logical replication slot remains on the current CN and a CSN-based logical replication slot with the same name remains on other nodes, connecting to a CN to delete a replication slot will delete only the local LSN-based logical replication slot.
In the view, the RETURNING clause can be added to the INSERT, UPDATE, and DELETE rules to return columns by view. If a rule is triggered by the INSERT RETURNING, UPDATE RETURNING, or DELETE RETURNING command, these clauses are used to calculate the output result.
resource labels. gaussdb=# DROP RESOURCE LABEL func_label, view_label, schema_label, column_label, table_label; -- Delete the func_for_label function. gaussdb=# DROP FUNCTION func_for_label; -- Delete the view_for_label view. gaussdb=# DROP VIEW view_for_label; -- Delete the schema_for_label
The system administrator has the permission to delete the specified table by default.
RESTRICT: refuses to delete the index if any objects depend on it. This is the default action.
If you fail to delete an object by specifying its name after truncation, specify its original name to delete it, or manually delete it from the system catalogs on each node.
ROLES(dev_audit, bob_audit), APP(gsql), IP('10.20.30.40', '127.0.0.0/24'); -- Delete the audit policy. gaussdb=# DROP AUDIT POLICY adt1, adt2, adt3, adt4; -- Delete the resource label. gaussdb=# DROP RESOURCE LABEL adt_lb0; -- Delete the tb_for_audit table. gaussdb=# DROP TABLE
ROLES(dev_audit, bob_audit), APP(gsql), IP('10.20.30.40', '127.0.0.0/24'); -- Delete an audit policy. gaussdb=# DROP AUDIT POLICY adt1, adt2, adt3, adt4; -- Delete a resource label. gaussdb=# DROP RESOURCE LABEL adt_lb0; -- Delete the tb_for_audit table. gaussdb=# DROP TABLE tb_for_audit
RESTRICT: refuses to delete the table if any objects depend on it. This is the default action. PURGE Specifies that even if the recycle bin function is enabled, the table is physically dropped instead of being moved to the recycle bin when you use DROP TABLE to delete tables.
DELETE: The DELETE process of enhanced TOAST does not depend on the TOAST data index. Instead, data is traversed and deleted based on the linking information between data. UPDATE: The UPDATE process of enhanced TOAST is the same as that of TOAST. Parent topic: Enhanced TOAST