This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 244bf84483 [improvement](docs) add docs for alter catalog stmt (#14789)
244bf84483 is described below
commit 244bf844839627eeeb2413b63b58e005d45ca87b
Author: Yulei-Yang <[email protected]>
AuthorDate: Thu Dec 8 19:46:58 2022 +0800
[improvement](docs) add docs for alter catalog stmt (#14789)
---
.../Alter/ALTER-CATALOG.md | 83 ++++++++++++++++++++++
docs/sidebars.json | 1 +
.../Alter/ALTER-CATALOG.md | 81 +++++++++++++++++++++
3 files changed, 165 insertions(+)
diff --git
a/docs/en/docs/sql-manual/sql-reference/Data-Definition-Statements/Alter/ALTER-CATALOG.md
b/docs/en/docs/sql-manual/sql-reference/Data-Definition-Statements/Alter/ALTER-CATALOG.md
new file mode 100644
index 0000000000..207986f9ef
--- /dev/null
+++
b/docs/en/docs/sql-manual/sql-reference/Data-Definition-Statements/Alter/ALTER-CATALOG.md
@@ -0,0 +1,83 @@
+---
+{
+ "title": "ALTER-CATALOG",
+ "language": "en"
+}
+---
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+## ALTER-CATALOG
+
+### Name
+
+<version since="1.2">
+
+ALTER CATALOG
+
+</version>
+
+### Description
+
+This statement is used to set properties of the specified catalog.
(administrator only)
+
+1) Rename the catalog
+
+```sql
+ALTER CATALOG catalog_name RENAME new_catalog_name;
+```
+
+illustrate:
+- The builtin catalog `internal` cannot be renamed
+- Only the one who has at least Alter privilege can rename a catalog
+- After renaming the catalog, use the REVOKE and GRANT commands to modify the
appropriate user permissions
+
+2) Modify / add properties for the catalog
+
+```sql
+ALTER CATALOG catalog_name SET PROPERTIES ('key1' = 'value1' [, 'key' =
'value2']);
+```
+
+Update values of specified keys. If a key does not exist in the catalog
properties, it will be added.
+
+illustrate:
+- property `type` cannot be modified.
+- properties of builtin catalog `internal` cannot be modified.
+
+### Example
+
+1. rename catalog ctlg_hive to hive
+
+```sql
+ALTER CATALOG ctlg_hive RENAME hive;
+```
+
+3. modify property `hive.metastore.uris` of catalog hive
+
+```sql
+ALTER CATALOG hive SET PROPERTIES
('hive.metastore.uris'='thrift://172.21.0.1:9083');
+```
+
+### Keywords
+
+ALTER,CATALOG,RENAME,PROPERTY
+
+### Best Practice
+
diff --git a/docs/sidebars.json b/docs/sidebars.json
index 2dfd53a662..b5cce77f2d 100644
--- a/docs/sidebars.json
+++ b/docs/sidebars.json
@@ -713,6 +713,7 @@
"type": "category",
"label": "Alter",
"items": [
+
"sql-manual/sql-reference/Data-Definition-Statements/Alter/ALTER-CATALOG",
"sql-manual/sql-reference/Data-Definition-Statements/Alter/ALTER-DATABASE",
"sql-manual/sql-reference/Data-Definition-Statements/Alter/ALTER-TABLE-BITMAP",
"sql-manual/sql-reference/Data-Definition-Statements/Alter/ALTER-TABLE-PARTITION",
diff --git
a/docs/zh-CN/docs/sql-manual/sql-reference/Data-Definition-Statements/Alter/ALTER-CATALOG.md
b/docs/zh-CN/docs/sql-manual/sql-reference/Data-Definition-Statements/Alter/ALTER-CATALOG.md
new file mode 100644
index 0000000000..ceff0e82d5
--- /dev/null
+++
b/docs/zh-CN/docs/sql-manual/sql-reference/Data-Definition-Statements/Alter/ALTER-CATALOG.md
@@ -0,0 +1,81 @@
+---
+{
+ "title": "ALTER-CATALOG",
+ "language": "zh-CN"
+}
+---
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+## ALTER-CATALOG
+
+### Name
+
+<version since="1.2">
+
+ALTER CATALOG
+
+</version>
+
+### Description
+
+该语句用于设置指定数据目录的属性。(仅管理员使用)
+
+1) 重命名数据目录
+
+```sql
+ALTER CATALOG catalog_name RENAME new_catalog_name;
+```
+注意:
+- `internal` 是内置数据目录,不允许重命名
+- 对 `catalog_name` 拥有 Alter 权限才允许对其重命名
+- 重命名数据目录后,如需要,请使用 REVOKE 和 GRANT 命令修改相应的用户权限。
+
+2) 设置数据目录属性
+
+```sql
+ALTER CATALOG catalog_name SET PROPERTIES ('key1' = 'value1' [, 'key' =
'value2']);
+```
+
+更新指定属性的值为指定的 value。如果 SET PROPERTIES 从句中的 key 在指定 catalog 属性中不存在,则新增此 key。
+
+注意:
+- 不可更改数据目录类型,即 `type` 属性
+- 不可更改内置数据目录 `internal` 的属性
+
+### Example
+
+1. 将数据目录 ctlg_hive 重命名为 hive
+
+```sql
+ALTER CATALOG ctlg_hive RENAME hive;
+```
+
+3. 更新名为 hive 数据目录的属性 `hive.metastore.uris`
+
+```sql
+ALTER CATALOG hive SET PROPERTIES
('hive.metastore.uris'='thrift://172.21.0.1:9083');
+```
+
+### Keywords
+
+ALTER,CATALOG,RENAME,PROPERTY
+
+### Best Practice
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]