暂无图片
分享
暂无图片 匿名用户
Kingbase ES有没类似Oracle sys_context函数

Kingbase ES有没类似Oracle sys_context函数

收藏
分享
1条回答
默认
最新
蓝胖子

Kingbase ES没有类似于sys_context 的统一函数,但针对大部分独立项都有类似功能的函数。

current_catalog name 当前数据库名(SQL 标准中称作“目录”)

current_database() name 当前数据库名

current_query() text 当前正在执行的查询的文本,和客户端提交的一样(可能包含多于一个语句)

current_role name 等效于current_user

current_schema[()] name 当前模式名

current_schemas(boolean) name[] 搜索路径中的模式名,可以选择是否包含隐式模式

current_user name 当前执行上下文的用户名

inet_client_addr() inet 远程连接的地址

inet_client_port() int 远程连接的端口

inet_server_addr() inet 本地连接的地址

inet_server_port() int 本地连接的端口

pg_backend_pid() int 与当前会话关联的服务器进程的进程 ID

pg_blocking_pids(int) int[] 阻塞指定服务器进程ID获得锁的进程 ID

pg_conf_load_time() timestamp with time zone 配置载入时间

pg_current_logfile([text]) text 当前日志收集器在使用的主日志文件名或者所要求格式的日志的文件名

pg_my_temp_schema() oid 会话的临时模式的 OID,如果没有则为 0

pg_is_other_temp_schema(oid) boolean 模式是另一个会话的临时模式吗?

pg_jit_available() boolean 这个会话中JIT编译是否可用(见第 31 章)?如果jit被设置为假,则返回false。 

pg_listening_channels() setof text 会话当前正在监听的频道名称

pg_notification_queue_usage() double 异步通知队列当前被占用的分数(0-1)

pg_postmaster_start_time() timestamp with time zone 服务器启动时间

pg_safe_snapshot_blocking_pids(int) int[] 阻止指定服务器进程ID获取安全快照的进程ID

pg_trigger_depth() int PostgreSQL触发器的当前嵌套层次(如果没有调用则为 0,直接或间接,从一个触发器内部开始)

session_user name 会话用户名

user name 等价于current_user

version() text PostgreSQL版本信息。机器可读的版本还可见server_version_num。

暂无图片 评论
暂无图片 有用 0
回答交流
提交
问题信息
请登录之后查看
邀请回答
暂无人订阅该标签,敬请期待~~
暂无图片墨值悬赏