morningman commented on code in PR #14789: URL: https://github.com/apache/doris/pull/14789#discussion_r1038970181
########## docs/zh-CN/docs/sql-manual/sql-reference/Data-Definition-Statements/Alter/ALTER-CATALOG.md: ########## @@ -0,0 +1,83 @@ +--- +{ + "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 + +```text Review Comment: no need ````text` in keywords region -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org