当前位置:网站首页>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
边栏推荐
猜你喜欢

473-82(40、662、31、98、189)

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

docker 拉取redis镜像 并运行

NGFW的Portal认证实验
C语言详解系列——函数的认识(2)如何使用函数实现交换两个整型变量的值

蓝绿部署、金丝雀发布、A/B测试是什么
![[wechat applet] design and interactive implementation of auction product details page (including countdown and real-time update of bids)](/img/b5/dd4316b83ef4b80c36b532de658bb2.png)
[wechat applet] design and interactive implementation of auction product details page (including countdown and real-time update of bids)

Write all the code as soon as you change the test steps? Why not try yaml to realize data-driven?

My meeting of OA project (query)

Data driven excel reading and writing
随机推荐
NGFW portal authentication experiment
Application of encryption technology
Thread pool serialization
ESP8266————AT指令+网络透传
[wechat Payment]
IT基础英语
Tencent will close the "magic core". Is there any resistance to the development of digital collections?
在原生终端实现类似 rz、sz 上传下载文件与目录的功能
单目标追踪——【相关滤波】MOSSE:Visual Object Tracking using Adaptive Correlation Filters
paypal订阅流程及api请求
合宙ESP32C3基于Arduino IDE框架下配置分区表
腾讯将关闭“幻核”,数字藏品领域发展是否面临阻力?
My meeting of OA project (query)
YOLOv1
[Android kotlin] property, getter and setter
C语言之字符串函数一
Why do most people think programming is difficult?
Mysql database foundation
Redis主从同步机制
Take stock of 10 new layer1 to prepare for the next bull market