当前位置:网站首页>GBase 8c 会话信息函数(六)
GBase 8c 会话信息函数(六)
2022-07-24 00:16:00 【大壮十二】
sessionid2pid()
描述: 从sessionid中得到pid信息(例如,gs_session_stat中sessid列)。
返回值类型: int8
示例:
gbase=# select sessionid2pid(sessid::cstring) from gs_session_stat limit 2;
sessionid2pid
-----------------
140574146287360
140574146287360
(2 rows)pg_trigger_depth()
描述:触发器的嵌套层次。
返回值类型:int
示例:
gbase=# SELECT pg_trigger_depth();
pg_trigger_depth
------------------
0
(1 row)session_user
描述:会话用户名。
返回值类型:name
示例:
gbase=# SELECT session_user;
session_user
--------------
gbase
(1 row)备注:session_user通常是连接当前数据库的初始用户,不过系统管理员可以用SET SESSION AUTHORIZATION修改这个设置。
user
描述:等价于current_user。
返回值类型:name
示例:
gbase=# SELECT user;
current_user
--------------
gbase
(1 row)getpgusername()
描述:获取数据库用户名。
返回值类型:name
示例:
gbase=# select getpgusername();
getpgusername
---------------
gbase
(1 row)getdatabaseencoding()
描述:获取数据库编码方式。
返回值类型:name
示例:
gbase=# select getdatabaseencoding();
getdatabaseencoding
---------------------
SQL_ASCII
(1 row)边栏推荐
猜你喜欢

Jenkins uses sonarqube to build pipeline code review project

English语法_指示代词 - So

Codeforces Round #807 (Div. 2)(A-D)

蓝绿部署、金丝雀发布、A/B测试是什么

Mobile terminal H5 - a lifeline timeline

高数_第2章多元函数微分学__偏导数的几何应用_空间曲线的切线与法平面

Splicing of.Net distribution with outlook mail format and table

Docker builds sonarqube, mysql5.7 environment

Pushgateway+prometheus+grafana build Flink real-time monitoring

NGFW的Portal认证实验
随机推荐
Space shooting lesson 07: add graphics
A lot of happiness in learning
QT create a background mask, pop up the child window, and the background of the parent window turns black and dark
[hcip] OSPF experiment under mGRE environment, including multi process bidirectional republication and OSPF special area
day2
Try new methods
【HCIP】MGRE环境下OSPF实验,含多进程双向重发布及OSPF特殊区域
paypal订阅流程及api请求
合宙ESP32C3基于Arduino IDE框架下配置分区表
logback
Adaptation scheme of large screen visualization
NGFW portal authentication experiment
Space shooting lesson 08: improved collision
Linked list - 707. Design linked list
高数_第1章空间解析几何与向量代数__两点距
Inftnews | protect the "Snow Mountain Spirit", and the 42verse "digital ecological protection" public welfare project is about to start
Happiness of progress and growth
iNFTnews | 呵护“雪山精灵”,42VERSE“数字生态保护”公益项目即将盛启
Tencent cloud was affirmed by international professional streaming media evaluation: video coding performance is the best in all three scenarios
What are blue-green deployment, Canary release and a/b test