当前位置:网站首页>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 .
边栏推荐
猜你喜欢

Use go language to realize try{}catch{}finally

easyExcel

y54.第三章 Kubernetes从入门到精通 -- ingress(二七)

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

Oauth2.0 authentication, login and access "/oauth/token", how to get the value of request header authorization (basictoken)???

Job object of collaboration in kotlin

返回一个树形结构数据

SPI mechanism

Machine learning notes (constantly updating...)

4. Classes and objects
随机推荐
The sandbox explains its vision for the meta universe platform
[fluent] fluent debugging (debug debugging window | viewing mobile phone log information | setting normal breakpoints | setting expression breakpoints)
GBase 8c系统表-pg_amproc
GBase 8c系统表-pg_collation
机器学习流程与方法
502 (bad gateway) causes and Solutions
COM and cn
【 tutoriel】 Chrome ferme les cors et les messages de la politique inter - domaines et apporte des cookies à travers les domaines
MySQL learning 03
去除网页滚动条方法以及内外边距
Flink CDC mongoDB 使用及Flink sql解析monggo中复杂嵌套JSON数据实现
Cfdiv2 Fixed Point Guessing - (2 points for Interval answer)
[Yu Yue education] China Ocean University job search OMG reference
easyExcel
[advanced ROS] Lesson 6 recording and playback in ROS (rosbag)
简单理解svg
Producer consumer model based on thread pool (including blocking queue)
[shutter] pull the navigation bar sideways (drawer component | pageview component)
awk从入门到入土(0)awk概述
Word word word