当前位置:网站首页>GBase 8c系统表信息函数(一)
GBase 8c系统表信息函数(一)
2022-07-24 00:16:00 【大壮十二】
- format_type(type_oid, typemod)
描述:获取数据类型的SQL名称。
返回类型:text
备注:format_type通过某个数据类型的类型OID以及可能的类型修饰词,返回其SQL名称。如果不知道具体的修饰词,则在类型修饰词的位置传入NULL。类型修饰词一般只对有长度限制的数据类型有意义。format_type所返回的SQL名称中包含数据类型的长度值,其大小是:实际存储长度len - sizeof(int32),单位字节。原因是数据存储时需要32位的空间来存储用户对数据类型的自定义长度信息,即实际存储长度要比用户定义长度多4个字节。在下例中,format_type返回的SQL名称为“character varying(6)”,6表示varchar类型的长度值是6字节,因此该类型的实际存储长度为10字节。
gbase=# SELECT format_type((SELECT oid FROM pg_type WHERE typname='varchar'), 10);
format_type
----------------------
character varying(6)
(1 row)
- getdistributekey(table_name)
描述:获取一个hash表的分布列。单机环境下不支持分布,该函数返回为空。
- pg_check_authid(role_oid)
描述:检查是否存在给定oid的角色名。
返回类型:bool
示例:
gbase=# select pg_check_authid(1);
pg_check_authid
-----------------
f
(1 row)
- pg_describe_object(catalog_id, object_id, object_sub_id)
描述:获取数据库对象的描述。
返回类型:text
备注:pg_describe_object返回由目录OID,对象OID和一个(或许0个)子对象ID指定的数据库对象的描述。这有助于确认存储在pg_depend系统表中对象的身份。
- pg_get_constraintdef(constraint_oid)
描述:获取约束的定义。
返回类型:text
- pg_get_constraintdef(constraint_oid, pretty_bool)
描述:获取约束的定义。
返回类型:text
边栏推荐
猜你喜欢

【HCIP】MGRE环境下OSPF实验,含多进程双向重发布及OSPF特殊区域

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

Why do most people think programming is difficult?

Jenkins uses sonarqube to build pipeline code review project

【微信小程序】拍卖商品详情页设计与交互实现(包含倒计时、实时更新出价)

Splicing of.Net distribution with outlook mail format and table

ESP8266————AT指令+网络透传

kubernetes error

Structured streaming programming model (input table, result table, output mode...)

腾讯将关闭“幻核”,数字藏品领域发展是否面临阻力?
随机推荐
权重分析——CRITIC权重法
高数_第1章空间解析几何与向量代数__两点距
Redis cluster construction (cluster cluster mode, fragment cluster)
Redis主从同步机制
学习的快乐很多
Blog expression Encyclopedia
Pytest interface automated test framework | pytest generates simple test reports
深度学习之 9 前馈神经网络 基本概念
[for loop if conditional statement] summary
L2TP的LAC自动拨号实验
.NET下发同Outlook邮件格式以及表格的拼接
Structured streaming programming model (input table, result table, output mode...)
The differences between text and image drawing, data storage, localstorage, sessionstorage, and cookies
Y75. Chapter IV Prometheus factory monitoring system and practice -- Prometheus alarm setting (VI)
Space shooting lesson 08: improved collision
Input and output of ACM mode
NGFW的Portal认证实验
docker搭建sonarqube,mysql5.7环境
Splicing of.Net distribution with outlook mail format and table
进步成长的快乐