GBase 8c
其他
文章

GBase 8c 会话信息函数(一)

发表于2023-12-06 14:14:1116次浏览2个评论

 GBase 8c提供会话信息函数,部分如下

current_catalog

描述:当前数据库的名称(在标准SQL中称“catalog”)。

返回值类型:name

示例:

 

 gbase=# SELECT current_catalog;

 current_database

------------------

 postgres

(1 row)

current_database()

描述:当前数据库的名称。

返回值类型:name

示例:

 

 gbase=# SELECT current_database();

 current_database

------------------

 postgres

(1 row)

current_query()

描述:由客户端提交的当前执行语句(可能包含多个声明)。

返回值类型:text

示例:

 

 gbase=# SELECT current_query();

      current_query

-------------------------

 SELECT current_query();

(1 row)

复制

评论

登录后才可以发表评论
用户头像
levvel发表于 2个月前
少年易学老难成,一寸光阴不可轻
GBase用户51882发表于 2个月前
厉害了