当前位置:网站首页>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
- My creation anniversary
- es6 filter() 数组过滤方法总结
- File class (check)
- Distributed transaction solution
- Basic operation of view
- 缺少库while loading shared libraries: libisl.so.15: cannot open shared object file: No such file
- CFdiv2-Fixed Point Guessing-(区间答案二分)
- Socket programming
- Machine learning notes (constantly updating...)
猜你喜欢

基于线程池的生产者消费者模型(含阻塞队列)

MySQL learning 03

Comment communiquer avec Huawei Cloud IOT via le Protocole mqtt

Button button adaptive size of wechat applet

Create + register sub apps_ Define routes, global routes and sub routes

4. 类和对象

Detailed introduction to the deployment and usage of the Nacos registry

Return a tree structure data

easyPOI

机器学习笔记(持续更新中。。。)
随机推荐
Awk from introduction to earth (0) overview of awk
Thread safe singleton mode
Pytorch convolution network regularization dropblock
Basic operation of view
Explore the conversion between PX pixels and Pt pounds, mm and MM
我的创作纪念日
Swift开发学习
Recommendation letter of "listing situation" -- courage is the most valuable
Redis: simple use of redis
微信小程序开发工具 POST net::ERR_PROXY_CONNECTION_FAILED 代理问题
Detailed introduction to the deployment and usage of the Nacos registry
My creation anniversary
Comment communiquer avec Huawei Cloud IOT via le Protocole mqtt
Socket编程
Tongda OA V12 process center
oauth2.0鉴权,登录访问 “/oauth/token”,请求头Authorization(basicToken)如何取值???
Startup mode and scope builder of collaboration in kotlin
CFdiv2-Fixed Point Guessing-(区间答案二分)
What are MySQL locks and classifications
机器学习笔记(持续更新中。。。)