当前位置:网站首页>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需要和在此表上为给定关系找到的检查约束的数目一致。
边栏推荐
- The use of Flink CDC mongodb and the implementation of Flink SQL parsing complex nested JSON data in monggo
- Leetcode (540) -- a single element in an ordered array
- leetcode961. Find the elements repeated N times in the array with length 2n
- Awk from introduction to earth (0) overview of awk
- 【ROS进阶篇】第六讲 ROS中的录制与回放(rosbag)
- GBase 8c系统表-pg_auth_members
- Y54. Chapter III kubernetes from introduction to mastery -- ingress (27)
- What are MySQL locks and classifications
- 创建+注册 子应用_定义路由,全局路由与子路由
- Trial setup and use of idea GoLand development tool
猜你喜欢

Recommendation letter of "listing situation" -- courage is the most valuable
![[shutter] shutter debugging (debugging fallback function | debug method of viewing variables in debugging | console information)](/img/66/0fda43da0d36fc0c9277ca86ece252.jpg)
[shutter] shutter debugging (debugging fallback function | debug method of viewing variables in debugging | console information)

What are MySQL locks and classifications

内存池(内核角度理解new开辟空间的过程)

elastic stack

详细些介绍如何通过MQTT协议和华为云物联网进行通信

4. Classes and objects

How can retail enterprises open the second growth curve under the full link digital transformation

Thread safe singleton mode

Tongda OA homepage portal workbench
随机推荐
File class (check)
GBase 8c系统表-pg_amproc
GBase 8c系统表pg_database
[shutter] hero animation (hero realizes radial animation | hero component createrecttween setting)
Kotlin middle process understanding and Practice (II)
[Yu Yue education] China Ocean University job search OMG reference
stm32F407-------DMA
Detailed introduction to the deployment and usage of the Nacos registry
Y54. Chapter III kubernetes from introduction to mastery -- ingress (27)
Startup mode and scope builder of collaboration in kotlin
easyPOI
Codeforces Round #418 (Div. 2) D. An overnight dance in discotheque
502 (bad gateway) causes and Solutions
stm32F407-------ADC
Missing library while loading shared libraries: libisl so. 15: cannot open shared object file: No such file
leetcode961. Find the elements repeated N times in the array with length 2n
Unrecognized SSL message, plaintext connection?
Trial setup and use of idea GoLand development tool
GBase 8c系统表-pg_conversion
y54.第三章 Kubernetes从入门到精通 -- ingress(二七)