当前位置:网站首页>GBase 8c 会话信息函数(五)

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

2022-07-24 00:16:00 大壮十二

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)

原网站

版权声明
本文为[大壮十二]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_41614765/article/details/125935976