GBase 8c
其他
文章

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

发表于2023-12-07 17:43:1513次浏览1个评论

pg_conf_load_time()

描述:配置加载时间。pg_conf_load_time返回最后加载服务器配置文件的时间戳。

返回值类型:timestamp with time zone

示例:

 

 gbase=# SELECT pg_conf_load_time();

       pg_conf_load_time

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

 2022-05-05 14:33:02.197289+08

(1 row)

pg_my_temp_schema()

描述:会话的临时模式的OID,不存在则为0。

返回值类型:oid

示例:

 

 gbase=# SELECT pg_my_temp_schema();

 pg_my_temp_schema

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

                 0

(1 row)

备注:pg_my_temp_schema返回当前会话中临时模式的OID,如果不存在(没有创建临时表)的话则返回0。如果给定的OID是其它会话中临时模式的OID,pg_is_other_temp_schema则返回true。

pg_is_other_temp_schema(oid)

描述:是否为另一个会话的临时模式。

返回值类型:Boolean

示例:

 

 gbase=# SELECT pg_is_other_temp_schema(25356);

 pg_is_other_temp_schema

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

 f

(1 row)

pg_listening_channels()

描述:会话正在侦听的信道名称。

返回值类型:setof text

示例:

 

 gbase=# SELECT pg_listening_channels();

 pg_listening_channels

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

(0 rows)

备注:pg_listening_channels返回当前会话正在侦听的一组信道名称。

pg_postmaster_start_time()

描述:服务器启动时间。pg_postmaster_start_time返回服务器启动时的timestamp with time zone。

返回值类型:timestamp with time zone

示例:

 

 gbase=# SELECT pg_postmaster_start_time();

   pg_postmaster_start_time

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

 2022-05-05 11:59:14.394307+08

(1 row)

pg_get_ruledef(rule_oid)

描述:获取规则的CREATE RULE命令。

返回值类型:text

示例:

 

 gbase=# select * from pg_get_ruledef(24828);

pg_get_ruledef

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

 -

(1 row)

评论

登录后才可以发表评论
用户头像
levvel发表于 8个月前
人生贵相知,何用金与钱