setSchemaComment

First introduced in version: 3.00.6

Syntax

setSchemaComment(catalog, schema, comment)

Details

Sets or updates the comment for a schema in the specified catalog. The comment cannot exceed 4096 bytes. Specify an empty string to clear the comment.

Note: After this function is called, the node cannot be downgraded to an earlier version. A downgrade may prevent the node from starting or truncate subsequent ACL logs.

Parameters

catalog is a STRING scalar specifying an existing catalog.

schema is a STRING scalar specifying an existing schema in catalog.

comment is a STRING scalar specifying the schema comment.

Returns

None.

Examples

catalogName = "securitiesMarketCatalog"
schemaName = "equityMarket"

if (existsCatalog(catalog=catalogName)) {
    dropCatalog(catalog=catalogName)
}

createCatalog(catalog=catalogName)
go
create database securitiesMarketCatalog.equityMarket partitioned by VALUE(1..3)
setSchemaComment(catalog=catalogName, schema=schemaName, comment="China A-share market data")

getSchemaComment(catalog=catalogName, schema=schemaName)
// output: China A-share market data

Related functions: getSchemaComment, getSchemaByCatalog, createSchema