当前位置:网站首页>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 .
边栏推荐
- 缺少库while loading shared libraries: libisl.so.15: cannot open shared object file: No such file
- Thread safe singleton mode
- GBase 8c触发器(二)
- Comment communiquer avec Huawei Cloud IOT via le Protocole mqtt
- Prohibited package name
- [Flutter] dart: class; abstract class; factory; Class, abstract class, factory constructor
- The data in servlet is transferred to JSP page, and the problem cannot be displayed using El expression ${}
- Ni visa fails after LabVIEW installs the third-party visa software
- The sandbox explains its vision for the meta universe platform
- Return a tree structure data
猜你喜欢

《上市风云》荐书——唯勇气最可贵

SPI机制

SPI mechanism

Y54. Chapter III kubernetes from introduction to mastery -- ingress (27)

Flink CDC mongoDB 使用及Flink sql解析monggo中复杂嵌套JSON数据实现

easyExcel

The use of Flink CDC mongodb and the implementation of Flink SQL parsing complex nested JSON data in monggo

Restcloud ETL cross database data aggregation operation

RestCloud ETL 跨库数据聚合运算

Return a tree structure data
随机推荐
require. context
Exception handling in kotlin process
Face recognition 6-face_ recognition_ Py based on OpenCV, face detection and real-time tracking using Haar cascade and Dlib Library
Tongda OA V12 process center
GBase 8c触发器(二)
easyExcel
Word word word
easyPOI
stm32F407-------DMA
内存池(内核角度理解new开辟空间的过程)
Leetcode (540) -- a single element in an ordered array
Trial setup and use of idea GoLand development tool
UDP receive queue and multiple initialization test
Current situation and future of Web3 in various countries
Cancellation of collaboration in kotlin, side effects of cancellation and overtime tasks
Method of removing webpage scroll bar and inner and outer margins
Cfdiv2 fixed point guessing- (interval answer two points)
Detailed introduction to the deployment and usage of the Nacos registry
Machine learning process and method
GBase 8c 创建用户/角色 示例二