当前位置:网站首页>GBase 8c系统表-pg_constraint
GBase 8c系统表-pg_constraint
2022-07-03 02:18:00 【大壮十二】
pg_constraint系统表存储表上的检查约束、主键、唯一约束和外键约束。
名称 | 类型 | 引用 | 描述 |
oid | oid | 行标识符(隐藏属性,必须被显式选择才会显示) | |
conname | name | 约束名字(不需要唯一!) | |
connamespace | oid | pg_namespace.oid | 包含此约束的名字空间的OID |
contype | char | c = 检查约束, f = 外键约束, p = 主键约束, u = 唯一约束, t = 约束触发器, x = 排他约束 | |
condeferrable | bool | 该约束是否能被延迟? | |
condeferred | bool | 该约束是否默认被延迟? | |
convalidated | bool | 此约束是否被验证过?当前对于外键和检查约束只能是假 | |
conrelid | oid | pg_class.oid | 该约束所在的表,如果不是表约束则为0 |
contypid | oid | pg_type.oid | 该约束所在的域,如果不是域约束则为0 |
conindid | oid | pg_class.oid | 如果该约束是唯一、主键、外键或排他约束,此列表示支持此约束的索引,否则为0 |
confrelid | oid | pg_class.oid | 如果此约束是一个外键约束,此列为被引用的表,否则为0 |
confupdtype | char | 外键更新动作代码: a = 无动作, r = 限制, c = 级联, n = 置空, d = 置为默认值 | |
confdeltype | char | 外键删除动作代码: a = 无动作, r = 限制, c = 级联, n = 置空, d = 置为默认值 | |
confmatchtype | char | 外键匹配类型: f = 完全, p = 部分, s = 简单 | |
conislocal | bool | 此约束是定义在关系本地。注意一个约束可以同时是本地定义和继承。 | |
coninhcount | int4 | 此约束的直接继承祖先数目。一个此列非零的约束不能被删除或重命名。 | |
connoinherit | bool | 为真表示此约束被定义在关系本地。它是一个不可继承约束。 | |
conkey | int2[] | pg_attribute.attnum | 如果是一个表约束(包括外键但不包括约束触发器),此列是被约束列的列表 |
confkey | int2[] | pg_attribute.attnum | 如果是一个外键,此列是被引用列的列表 |
conpfeqop | oid[] | pg_operator.oid | 如果是一个外键,此列是用于PK = FK比较的等值操作符的列表 |
conppeqop | oid[] | pg_operator.oid | 如果是一个外键,此列是用于PK = PK比较的等值操作符的列表 |
conffeqop | oid[] | pg_operator.oid | 如果是一个外键,此列是用于FK = FK比较的等值操作符的列表 |
conexclop | oid[] | pg_operator.oid | 如果是一个排他约束,此列是没列排他操作符的列表 |
conbin | pg_node_tree | 如果是一个检查约束,此列是表达式的一个内部表示 | |
consrc | text | 如果是一个检查约束,此列是表达式的一个人类可读的表示 |
注意:consrc在被引用的对象改变之后不会被更新,它不会跟踪字段的名字修改。与其依赖这个字段,最好还是使用pg_get_constraintdef()来抽取一个检查约束的定义。
pg_class.relchecks需要和在此表上为给定关系找到的检查约束的数目一致。
边栏推荐
- GBase 8c系统表-pg_am
- Socket programming
- [Yu Yue education] Jiujiang University material analysis and testing technology reference
- Awk from entry to burial (1) awk first meeting
- 详细些介绍如何通过MQTT协议和华为云物联网进行通信
- 通达OA v12流程中心
- stm32F407-------DMA
- 【教程】chrome关闭跨域策略cors、samesite,跨域带上cookie
- Swift开发学习
- Visual yolov5 format data set (labelme JSON file)
猜你喜欢
How do it students find short-term internships? Which is better, short-term internship or long-term internship?
Awk from introduction to earth (0) overview of awk
Ni visa fails after LabVIEW installs the third-party visa software
Servlet中数据传到JSP页面使用el表达式${}无法显示问题
Solution for processing overtime orders (Overtime unpaid)
Recommendation letter of "listing situation" -- courage is the most valuable
easyPOI
[shutter] shutter debugging (debugging control related functions | breakpoint management | code operation control)
深度学习笔记(持续更新中。。。)
[shutter] bottom navigation bar implementation (bottomnavigationbar bottom navigation bar | bottomnavigationbaritem navigation bar entry | pageview)
随机推荐
Cancellation of collaboration in kotlin, side effects of cancellation and overtime tasks
Iptables layer 4 forwarding
leetcode961. Find the elements repeated N times in the array with length 2n
RestCloud ETL 跨库数据聚合运算
Distributed transaction solution
stm32F407-------ADC
SPI机制
詳細些介紹如何通過MQTT協議和華為雲物聯網進行通信
Cfdiv2 Fixed Point Guessing - (2 points for Interval answer)
My creation anniversary
Return a tree structure data
【CodeForces】CF1338A - Powered Addition【二进制】
缺少库while loading shared libraries: libisl.so.15: cannot open shared object file: No such file
PyTorch 卷积网络正则化 DropBlock
GBase 8c系统表-pg_conversion
Su Shimin: 25 principles of work and life
easyPOI
Startup mode and scope builder of collaboration in kotlin
Create + register sub apps_ Define routes, global routes and sub routes
File class (add / delete)