当前位置:网站首页>Gbase 8C system table PG_ constraint
Gbase 8C system table PG_ constraint
2022-07-03 02:22:00 【Dazhuang twelve】
pg_constraint System tables store check constraints on tables 、 Primary key 、 Unique constraints and foreign key constraints .
name | type | quote | describe |
oid | oid | Row identifier ( Hidden attribute , Must be explicitly selected to display ) | |
conname | name | Constraint name ( It doesn't need to be the only one !) | |
connamespace | oid | pg_namespace.oid | The name of the namespace containing this constraint OID |
contype | char | c = Check constraint , f = Foreign key constraints , p = Primary key constraint , u = Unique constraint , t = Constraint trigger , x = Exclusive constraints | |
condeferrable | bool | Whether the constraint can be delayed ? | |
condeferred | bool | Whether the constraint is delayed by default ? | |
convalidated | bool | Whether this constraint has been verified ? Currently, foreign keys and check constraints can only be false | |
conrelid | oid | pg_class.oid | The table where the constraint is located , If it is not a table constraint, it is 0 |
contypid | oid | pg_type.oid | The domain in which the constraint resides , If it is not a domain constraint, it is 0 |
conindid | oid | pg_class.oid | If the constraint is unique 、 Primary key 、 Foreign keys or exclusive constraints , This column represents the index that supports this constraint , Otherwise 0 |
confrelid | oid | pg_class.oid | If this constraint is a foreign key constraint , This column is the referenced table , Otherwise 0 |
confupdtype | char | Foreign key update action code : a = No action , r = Limit , c = cascade , n = empty , d = Set to default | |
confdeltype | char | Foreign key deletion action code : a = No action , r = Limit , c = cascade , n = empty , d = Set to default | |
confmatchtype | char | Foreign key matching type : f = Completely , p = part , s = Simple | |
conislocal | bool | This constraint is defined locally in the relationship . Note that a constraint can be both locally defined and inherited . | |
coninhcount | int4 | Number of direct inheritance ancestors for this constraint . A non-zero constraint on this column cannot be deleted or renamed . | |
connoinherit | bool | True means that the constraint is defined locally in the relationship . It is a non inheritable constraint . | |
conkey | int2[] | pg_attribute.attnum | If it is a table constraint ( Include foreign keys but not constraint triggers ), This column is a list of constrained Columns |
confkey | int2[] | pg_attribute.attnum | If it's a foreign key , This column is a list of referenced Columns |
conpfeqop | oid[] | pg_operator.oid | If it's a foreign key , This column is used for PK = FK List of equivalent operators for comparison |
conppeqop | oid[] | pg_operator.oid | If it's a foreign key , This column is used for PK = PK List of equivalent operators for comparison |
conffeqop | oid[] | pg_operator.oid | If it's a foreign key , This column is used for FK = FK List of equivalent operators for comparison |
conexclop | oid[] | pg_operator.oid | If it's an exclusive constraint , This column is a list of non exclusive operators |
conbin | pg_node_tree | If it is a check constraint , This column is an internal representation of the expression | |
consrc | text | If it is a check constraint , This column is a human readable representation of the expression |
Be careful :consrc It will not be updated after the referenced object changes , It does not track field name changes . Instead of relying on this field , It's better to use pg_get_constraintdef() To extract the definition of a check constraint .
pg_class.relchecks It needs to be consistent with the number of check constraints found on this table for a given relationship .
边栏推荐
- 基于线程池的生产者消费者模型(含阻塞队列)
- Unrecognized SSL message, plaintext connection?
- 5. File operation
- Monitoring and management of JVM
- Depth (penetration) selector:: v-deep/deep/ and > > >
- Recommendation letter of "listing situation" -- courage is the most valuable
- Solution for processing overtime orders (Overtime unpaid)
- stm32F407-------DMA
- GBase 8c系统表-pg_conversion
- 返回一个树形结构数据
猜你喜欢
RestCloud ETL 跨库数据聚合运算
Detailed introduction to the usage of Nacos configuration center
使用Go语言实现try{}catch{}finally
创建+注册 子应用_定义路由,全局路由与子路由
[shutter] shutter debugging (debugging control related functions | breakpoint management | code operation control)
《上市风云》荐书——唯勇气最可贵
Job object of collaboration in kotlin
线程安全的单例模式
stm32F407-------ADC
Depth (penetration) selector:: v-deep/deep/ and > > >
随机推荐
Leetcode (540) -- a single element in an ordered array
Face recognition 6-face_ recognition_ Py based on OpenCV, face detection and real-time tracking using Haar cascade and Dlib Library
缺少库while loading shared libraries: libisl.so.15: cannot open shared object file: No such file
4. 类和对象
The Sandbox阐释对元宇宙平台的愿景
String replace space
MySQL learning 03
awk从入门到入土(0)awk概述
通达OA v12流程中心
我的创作纪念日
Producer consumer model based on thread pool (including blocking queue)
【教程】chrome关闭跨域策略cors、samesite,跨域带上cookie
GBase 8c系统表-pg_collation
stm32F407-------DMA
Codeforces Round #418 (Div. 2) D. An overnight dance in discotheque
GBase 8c系统表-pg_aggregate
The data in servlet is transferred to JSP page, and the problem cannot be displayed using El expression ${}
[shutter] top navigation bar implementation (scaffold | defaulttabcontroller | tabbar | tab | tabbarview)
GBase 8c系统表-pg_amproc
Method of removing webpage scroll bar and inner and outer margins