当前位置:网站首页>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需要和在此表上为给定关系找到的检查约束的数目一致。
边栏推荐
- Tongda OA V12 process center
- SPI mechanism
- [Flutter] dart: class; abstract class; factory; Class, abstract class, factory constructor
- Create + register sub apps_ Define routes, global routes and sub routes
- Basic operation of view
- How can retail enterprises open the second growth curve under the full link digital transformation
- 【教程】chrome关闭跨域策略cors、samesite,跨域带上cookie
- 去除网页滚动条方法以及内外边距
- Codeforces Round #418 (Div. 2) D. An overnight dance in discotheque
- Producer consumer model based on thread pool (including blocking queue)
猜你喜欢
随机推荐
easyPOI
QT qcombobox add qccheckbox (drop-down list box insert check box, including source code + comments)
[shutter] shutter debugging (debugging control related functions | breakpoint management | code operation control)
Trial setup and use of idea GoLand development tool
Summary of ES6 filter() array filtering methods
[codeforces] cf1338a - Powered addition [binary]
awk从入门到入土(1)awk初次会面
缺少库while loading shared libraries: libisl.so.15: cannot open shared object file: No such file
[Yu Yue education] reference materials of chemical experiment safety knowledge of University of science and technology of China
Machine learning process and method
Storage basic operation
4. Classes and objects
Introduce in detail how to communicate with Huawei cloud IOT through mqtt protocol
Pytorch convolution network regularization dropblock
GBase 8c系统表-pg_authid
使用Go语言实现try{}catch{}finally
各国Web3现状与未来
[fluent] fluent debugging (debug debugging window | viewing mobile phone log information | setting normal breakpoints | setting expression breakpoints)
Face recognition 6-face_ recognition_ Py based on OpenCV, face detection and real-time tracking using Haar cascade and Dlib Library
Thread safe singleton mode
![[shutter] pull the navigation bar sideways (drawer component | pageview component)](/img/6f/dfc9dae5f890125d0cebdb2a0f4638.gif)




![[Flutter] dart: class;abstract class;factory;类、抽象类、工厂构造函数](/img/06/ab333a4752de27eae2dd937cf579e2.png)



