current_catalog
描述:当前数据库的名称(在标准SQL中称“catalog”)。
返回值类型:name
示例:
openGauss=# SELECT current_catalog; current_database ------------------ openGauss (1 row)current_database()
描述:当前数据库的名称。
返回值类型:name
示例:
openGauss=# SELECT current_database(); current_database ------------------ openGauss (1 row)current_query()
描述:由客户端提交的当前执行语句(可能包含多个声明)。
返回值类型:text
示例:
openGauss=# SELECT current_query(); current_query ------------------------- SELECT current_query(); (1 row)current_schema[()]
描述:当前模式的名称。
返回值类型:name
示例:
openGauss=# SELECT current_schema(); current_schema ---------------- public (1 row)备注:current_schema返回在搜索路径中第一个顺位有效的模式名。(如果搜索路径为空则返回NULL,没有有效的模式名也返回NULL)。如果创建表或者其他命名对象时没有声明目标模式,则将使用这些对象的模式。
current_schemas(Boolean)
描述:搜索路径中的模式名称。
返回值类型:name[]
示例:
openGauss=# SELECT current_schemas(true); current_schemas --------------------- {pg_catalog,public} (1 row)备注:
current_schemas(Boolean)返回搜索路径中所有模式名称的数组。布尔选项决定像pg_catalog这样隐含包含的系统模式是否包含在返回的搜索路径中。
说明: 搜索路径可以通过运行时设置更改。命令是:SET sea
最后修改时间:2022-11-03 09:35:55
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




