{"Entry":{"collection":"catalog","key":"pg_constraint","name":"pg_constraint","aliases":[],"metadata":{"changed_in":["8.3","8.4","9.0","9.1","9.2","11","12","15","16","18"],"changes":[{"added":["conpfeqop","conppeqop","conffeqop"],"attributes":[],"description_changed":false,"descriptions":[],"from":"8.2","listing":[],"order":false,"removed":[],"status":"changed","to":"8.3","types":[],"unlisted":[]},{"added":["conislocal","coninhcount"],"attributes":[],"description_changed":false,"descriptions":[{"from":"Foreign key deletion action code","name":"confdeltype","to":"Foreign key deletion action code: a = no action, r = restrict, c = cascade, n = set null, d = set default"},{"from":"Foreign key match type","name":"confmatchtype","to":"Foreign key match type: f = full, p = partial, u = simple (unspecified)"},{"from":"Foreign key update action code","name":"confupdtype","to":"Foreign key update action code: a = no action, r = restrict, c = cascade, n = set null, d = set default"},{"from":"If a table constraint, list of columns which the constraint constrains","name":"conkey","to":"If a table constraint (including a foreign key), list of the constrained columns"}],"from":"8.3","listing":[],"order":false,"removed":[],"status":"changed","to":"8.4","types":[],"unlisted":[]},{"added":["conindid","conexclop"],"attributes":[],"description_changed":true,"descriptions":[{"from":"The number of direct ancestors this constraint has. A constraint with a nonzero number of ancestors cannot be dropped nor renamed","name":"coninhcount","to":"The number of direct inheritance ancestors this constraint has. A constraint with a nonzero number of ancestors cannot be dropped nor renamed."},{"from":"This constraint is defined locally in the relation. Note that a constraint can be locally defined and inherited simultaneously","name":"conislocal","to":"This constraint is defined locally for the relation. Note that a constraint can be locally defined and inherited simultaneously."},{"from":"If a table constraint (including a foreign key), list of the constrained columns","name":"conkey","to":"If a table constraint (including foreign keys, but not constraint triggers), list of the constrained columns"},{"from":"c = check constraint, f = foreign key constraint, p = primary key constraint, u = unique constraint","name":"contype","to":"c = check constraint, f = foreign key constraint, p = primary key constraint, u = unique constraint, t = constraint trigger, x = exclusion constraint"}],"from":"8.4","listing":[],"order":false,"removed":[],"status":"changed","to":"9.0","types":[],"unlisted":[]},{"added":["convalidated"],"attributes":[],"description_changed":false,"descriptions":[],"from":"9.0","listing":[],"order":false,"removed":[],"status":"changed","to":"9.1","types":[{"from":"text","name":"conbin","to":"pg_node_tree"}],"unlisted":[]},{"added":["connoinherit"],"attributes":[],"description_changed":false,"descriptions":[{"from":"Has the constraint been validated? Currently, can only be false for foreign keys","name":"convalidated","to":"Has the constraint been validated? Currently, can only be false for foreign keys and CHECK constraints"}],"from":"9.1","listing":[],"order":false,"removed":[],"status":"changed","to":"9.2","types":[],"unlisted":[]},{"added":[],"attributes":[],"description_changed":false,"descriptions":[{"from":"Foreign key match type: f = full, p = partial, u = simple (unspecified)","name":"confmatchtype","to":"Foreign key match type: f = full, p = partial, s = simple"}],"from":"9.2","listing":[],"order":false,"removed":[],"status":"reworded","to":"9.3","types":[],"unlisted":[]},{"added":["conparentid"],"attributes":[],"description_changed":false,"descriptions":[],"from":"10","listing":[],"order":false,"removed":[],"status":"changed","to":"11","types":[],"unlisted":[]},{"added":[],"attributes":[{"attribute":"hidden","from":true,"name":"oid","to":false}],"description_changed":false,"descriptions":[{"from":"If a check constraint, an internal representation of the expression","name":"conbin","to":"If a check constraint, an internal representation of the expression. (It's recommended to use pg_get_constraintdef() to extract the definition of a check constraint.)"}],"from":"11","listing":[],"order":false,"removed":["consrc"],"status":"changed","to":"12","types":[],"unlisted":[]},{"added":[],"attributes":[],"description_changed":false,"descriptions":[{"from":"If a foreign key, the referenced table; else 0","name":"confrelid","to":"If a foreign key, the referenced table; else zero"},{"from":"The index supporting this constraint, if it's a unique, primary key, foreign key, or exclusion constraint; else 0","name":"conindid","to":"The index supporting this constraint, if it's a unique, primary key, foreign key, or exclusion constraint; else zero"},{"from":"The corresponding constraint in the parent partitioned table, if this is a constraint in a partition; else 0","name":"conparentid","to":"The corresponding constraint of the parent partitioned table, if this is a constraint on a partition; else zero"},{"from":"The table this constraint is on; 0 if not a table constraint","name":"conrelid","to":"The table this constraint is on; zero if not a table constraint"},{"from":"The domain this constraint is on; 0 if not a domain constraint","name":"contypid","to":"The domain this constraint is on; zero if not a domain constraint"},{"from":"Has the constraint been validated? Currently, can only be false for foreign keys and CHECK constraints","name":"convalidated","to":"Has the constraint been validated? Currently, can be false only for foreign keys and CHECK constraints"}],"from":"13","listing":[],"order":false,"removed":[],"status":"reworded","to":"14","types":[],"unlisted":[]},{"added":["confdelsetcols"],"attributes":[],"description_changed":false,"descriptions":[],"from":"14","listing":[],"order":false,"removed":[],"status":"changed","to":"15","types":[],"unlisted":[]},{"added":[],"attributes":[],"description_changed":false,"descriptions":[],"from":"15","listing":[],"order":false,"removed":[],"status":"changed","to":"16","types":[{"from":"int4","name":"coninhcount","to":"int2"}],"unlisted":[]},{"added":[],"attributes":[],"description_changed":true,"descriptions":[{"from":"c = check constraint, f = foreign key constraint, p = primary key constraint, u = unique constraint, t = constraint trigger, x = exclusion constraint","name":"contype","to":"c = check constraint, f = foreign key constraint, n = not-null constraint (domains only), p = primary key constraint, u = unique constraint, t = constraint trigger, x = exclusion constraint"}],"from":"16","listing":[],"order":false,"removed":[],"status":"reworded","to":"17","types":[],"unlisted":[]},{"added":["conenforced","conperiod"],"attributes":[],"description_changed":true,"descriptions":[{"from":"If an exclusion constraint, list of the per-column exclusion operators","name":"conexclop","to":"If an exclusion constraint or WITHOUT OVERLAPS primary key/unique constraint, list of the per-column exclusion operators."},{"from":"c = check constraint, f = foreign key constraint, n = not-null constraint (domains only), p = primary key constraint, u = unique constraint, t = constraint trigger, x = exclusion constraint","name":"contype","to":"c = check constraint, f = foreign key constraint, n = not-null constraint, p = primary key constraint, u = unique constraint, t = constraint trigger, x = exclusion constraint"},{"from":"Has the constraint been validated? Currently, can be false only for foreign keys and CHECK constraints","name":"convalidated","to":"Has the constraint been validated?"}],"from":"17","listing":[],"order":false,"removed":[],"status":"changed","to":"18","types":[],"unlisted":[]}],"column_count":28,"content_hash":"a309cb0652c027b09b2c90be118990fdbf5284baf221335d633d083f4ec9094f","derived_content_hash":"daa32ad72436927280ccbd88a5e9d6915944c25053021a22457ddfd574973dd7","first_version":"7.4","imported_at":"2026-09-30T00:40:55.452929+08:00","kind":"catalog","last_version":"20","name":"pg_constraint","position":17,"present_in":["7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"relation_oid":null,"relkind":"r","shared":false,"source_rev":"catalog-bilingual-repair:3428b991c0a50aa15565f2c2fb7767a7235f864ea22d970eb5a75bca5e8da673","summary":"The catalog pg_constraint stores check, not-null, primary key, unique, foreign key, and exclusion constraints on tables.","summary_zh":"目录 pg_constraint 存储表上的检查约束、非空约束、主键约束、唯一约束、外键约束和排他约束。（列约束不会被特殊对待。每一个列约束都等价于某种表约束。）"}},"Definition":{"Collection":"catalog","Key":"pg_constraint","SourceDatabase":"center","Version":"18","SourceTable":"catalog","SourceKey":"pg_constraint","SourceRevision":"catalog-bilingual-repair:3428b991c0a50aa15565f2c2fb7767a7235f864ea22d970eb5a75bca5e8da673","Facts":{"columns":[{"array_dimensions":0,"attnum":1,"description":"Row identifier","description_zh":"行标识符","documented":true,"documented_name":"oid","hidden":false,"name":"oid","not_null":true,"references":"","type":"oid","type_modifier":-1,"type_oid":26,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":2,"description":"Constraint name (not necessarily unique!)","description_zh":"约束名称（不一定唯一！）","documented":true,"documented_name":"conname","hidden":false,"name":"conname","not_null":true,"references":"","type":"name","type_modifier":-1,"type_oid":19,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":3,"description":"The OID of the namespace that contains this constraint","description_zh":"包含此约束的名字空间的 OID","documented":true,"documented_name":"connamespace","hidden":false,"name":"connamespace","not_null":true,"references":"pg_namespace.oid","type":"oid","type_modifier":-1,"type_oid":26,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":4,"description":"c = check constraint, f = foreign key constraint, n = not-null constraint, p = primary key constraint, u = unique constraint, t = constraint trigger, x = exclusion constraint","description_zh":"c = 检查约束，f = 外键约束，n = 非空约束，p = 主键约束，u = 唯一约束，t = 约束触发器，x = 排他约束","documented":true,"documented_name":"contype","hidden":false,"name":"contype","not_null":true,"references":"","type":"char","type_modifier":-1,"type_oid":18,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":5,"description":"Is the constraint deferrable?","description_zh":"该约束是否能被延迟？","documented":true,"documented_name":"condeferrable","hidden":false,"name":"condeferrable","not_null":true,"references":"","type":"bool","type_modifier":-1,"type_oid":16,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":6,"description":"Is the constraint deferred by default?","description_zh":"该约束是否默认被延迟？","documented":true,"documented_name":"condeferred","hidden":false,"name":"condeferred","not_null":true,"references":"","type":"bool","type_modifier":-1,"type_oid":16,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":7,"description":"Is the constraint enforced?","description_zh":"该约束是否会被强制执行？","documented":true,"documented_name":"conenforced","hidden":false,"name":"conenforced","not_null":true,"references":"","type":"bool","type_modifier":-1,"type_oid":16,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":8,"description":"Has the constraint been validated?","description_zh":"该约束是否已经验证？","documented":true,"documented_name":"convalidated","hidden":false,"name":"convalidated","not_null":true,"references":"","type":"bool","type_modifier":-1,"type_oid":16,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":9,"description":"The table this constraint is on; zero if not a table constraint","description_zh":"该约束所在的表，如果不是表约束则为零","documented":true,"documented_name":"conrelid","hidden":false,"name":"conrelid","not_null":true,"references":"pg_class.oid","type":"oid","type_modifier":-1,"type_oid":26,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":10,"description":"The domain this constraint is on; zero if not a domain constraint","description_zh":"该约束所在的域，如果不是域约束则为 0","documented":true,"documented_name":"contypid","hidden":false,"name":"contypid","not_null":true,"references":"pg_type.oid","type":"oid","type_modifier":-1,"type_oid":26,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":11,"description":"The index supporting this constraint, if it's a unique, primary key, foreign key, or exclusion constraint; else zero","description_zh":"如果该约束是唯一、主键、外键或排他约束，此列表示支持此约束的索引，否则为零","documented":true,"documented_name":"conindid","hidden":false,"name":"conindid","not_null":true,"references":"pg_class.oid","type":"oid","type_modifier":-1,"type_oid":26,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":12,"description":"The corresponding constraint of the parent partitioned table, if this is a constraint on a partition; else zero","description_zh":"如果这是一个分区中的约束，则是父分区表中对应的约束；否则为零","documented":true,"documented_name":"conparentid","hidden":false,"name":"conparentid","not_null":true,"references":"pg_constraint.oid","type":"oid","type_modifier":-1,"type_oid":26,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":13,"description":"If a foreign key, the referenced table; else zero","description_zh":"如果此约束是一个外键约束，此列为被引用的表，否则为零","documented":true,"documented_name":"confrelid","hidden":false,"name":"confrelid","not_null":true,"references":"pg_class.oid","type":"oid","type_modifier":-1,"type_oid":26,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":14,"description":"Foreign key update action code: a = no action, r = restrict, c = cascade, n = set null, d = set default","description_zh":"外键更新动作代码：a = 无动作，r = 限制，c = 级联，n = 置空，d = 置为默认值","documented":true,"documented_name":"confupdtype","hidden":false,"name":"confupdtype","not_null":true,"references":"","type":"char","type_modifier":-1,"type_oid":18,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":15,"description":"Foreign key deletion action code: a = no action, r = restrict, c = cascade, n = set null, d = set default","description_zh":"外键删除动作代码：a = 无动作，r = 限制，c = 级联，n = 置空，d = 置为默认值","documented":true,"documented_name":"confdeltype","hidden":false,"name":"confdeltype","not_null":true,"references":"","type":"char","type_modifier":-1,"type_oid":18,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":16,"description":"Foreign key match type: f = full, p = partial, s = simple","description_zh":"外键匹配类型：f = 完全，p = 部分，s = 简单","documented":true,"documented_name":"confmatchtype","hidden":false,"name":"confmatchtype","not_null":true,"references":"","type":"char","type_modifier":-1,"type_oid":18,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":17,"description":"This constraint is defined locally for the relation. Note that a constraint can be locally defined and inherited simultaneously.","description_zh":"此约束定义在关系本地。注意一个约束可以同时是本地定义和继承。","documented":true,"documented_name":"conislocal","hidden":false,"name":"conislocal","not_null":true,"references":"","type":"bool","type_modifier":-1,"type_oid":16,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":18,"description":"The number of direct inheritance ancestors this constraint has. A constraint with a nonzero number of ancestors cannot be dropped nor renamed.","description_zh":"该约束直接继承自多少个祖先。祖先数量非零的约束不能被删除，也不能被重命名。","documented":true,"documented_name":"coninhcount","hidden":false,"name":"coninhcount","not_null":true,"references":"","type":"int2","type_modifier":-1,"type_oid":21,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":19,"description":"This constraint is defined locally for the relation. It is a non-inheritable constraint.","description_zh":"为真表示此约束被定义在关系本地。它是一个不可继承约束。","documented":true,"documented_name":"connoinherit","hidden":false,"name":"connoinherit","not_null":true,"references":"","type":"bool","type_modifier":-1,"type_oid":16,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":20,"description":"This constraint is defined with WITHOUT OVERLAPS (for primary keys and unique constraints) or PERIOD (for foreign keys).","description_zh":"如果该约束被定义为 WITHOUT OVERLAPS（主键或唯一约束）或 PERIOD（外键），则为真。","documented":true,"documented_name":"conperiod","hidden":false,"name":"conperiod","not_null":true,"references":"","type":"bool","type_modifier":-1,"type_oid":16,"zh_from":"same-version-manual"},{"array_dimensions":1,"attnum":21,"description":"If a table constraint (including foreign keys, but not constraint triggers), list of the constrained columns","description_zh":"如果是一个表约束（包括外键但不包括约束触发器），此列是被约束列的列表","documented":true,"documented_name":"conkey","hidden":false,"name":"conkey","not_null":false,"references":"pg_attribute.attnum","type":"int2[]","type_modifier":-1,"type_oid":1005,"zh_from":"same-version-manual"},{"array_dimensions":1,"attnum":22,"description":"If a foreign key, list of the referenced columns","description_zh":"如果是一个外键，此列是被引用列的列表","documented":true,"documented_name":"confkey","hidden":false,"name":"confkey","not_null":false,"references":"pg_attribute.attnum","type":"int2[]","type_modifier":-1,"type_oid":1005,"zh_from":"same-version-manual"},{"array_dimensions":1,"attnum":23,"description":"If a foreign key, list of the equality operators for PK = FK comparisons","description_zh":"如果是一个外键，此列是用于 PK = FK 比较的等值操作符的列表","documented":true,"documented_name":"conpfeqop","hidden":false,"name":"conpfeqop","not_null":false,"references":"pg_operator.oid","type":"oid[]","type_modifier":-1,"type_oid":1028,"zh_from":"same-version-manual"},{"array_dimensions":1,"attnum":24,"description":"If a foreign key, list of the equality operators for PK = PK comparisons","description_zh":"如果是一个外键，此列是用于 PK = PK 比较的等值操作符的列表","documented":true,"documented_name":"conppeqop","hidden":false,"name":"conppeqop","not_null":false,"references":"pg_operator.oid","type":"oid[]","type_modifier":-1,"type_oid":1028,"zh_from":"same-version-manual"},{"array_dimensions":1,"attnum":25,"description":"If a foreign key, list of the equality operators for FK = FK comparisons","description_zh":"如果是一个外键，此列是用于 FK = FK 比较的等值操作符的列表","documented":true,"documented_name":"conffeqop","hidden":false,"name":"conffeqop","not_null":false,"references":"pg_operator.oid","type":"oid[]","type_modifier":-1,"type_oid":1028,"zh_from":"same-version-manual"},{"array_dimensions":1,"attnum":26,"description":"If a foreign key with a SET NULL or SET DEFAULT delete action, the columns that will be updated. If null, all of the referencing columns will be updated.","description_zh":"如果外键具有 SET NULL 或 SET DEFAULT 删除动作，则这里列出将被更新的列。如果为 NULL，则会更新所有引用列。","documented":true,"documented_name":"confdelsetcols","hidden":false,"name":"confdelsetcols","not_null":false,"references":"pg_attribute.attnum","type":"int2[]","type_modifier":-1,"type_oid":1005,"zh_from":"same-version-manual"},{"array_dimensions":1,"attnum":27,"description":"If an exclusion constraint or WITHOUT OVERLAPS primary key/unique constraint, list of the per-column exclusion operators.","description_zh":"如果是排他约束或 WITHOUT OVERLAPS 主键/唯一约束，则这里列出每列的排他操作符。","documented":true,"documented_name":"conexclop","hidden":false,"name":"conexclop","not_null":false,"references":"pg_operator.oid","type":"oid[]","type_modifier":-1,"type_oid":1028,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":28,"description":"If a check constraint, an internal representation of the expression. (It's recommended to use pg_get_constraintdef() to extract the definition of a check constraint.)","description_zh":"如果是一个检查约束，此列是表达式的一个内部表示。建议使用 pg_get_constraintdef() 提取检查约束的定义。","documented":true,"documented_name":"conbin","hidden":false,"name":"conbin","not_null":false,"references":"","type":"pg_node_tree","type_modifier":-1,"type_oid":194,"zh_from":"same-version-manual"}],"description":"The catalog pg_constraint stores check, not-null, primary key, unique, foreign key, and exclusion constraints on tables. (Column constraints are not treated specially. Every column constraint is equivalent to some table constraint.)\n\nUser-defined constraint triggers (created with CREATE CONSTRAINT TRIGGER) also give rise to an entry in this table.\n\nCheck constraints on domains are stored here, too.","description_zh":"目录 pg_constraint 存储表上的检查约束、非空约束、主键约束、唯一约束、外键约束和排他约束。（列约束不会被特殊对待。每一个列约束都等价于某种表约束。）\n\n用户定义的约束触发器（使用 CREATE CONSTRAINT TRIGGER 创建）也会在这个表中产生一项。\n\n域上的检查约束也存储在这里。","description_zh_html":"\u003cp\u003e目录 pg_constraint 存储表上的检查约束、非空约束、主键约束、唯一约束、外键约束和排他约束。（列约束不会被特殊对待。每一个列约束都等价于某种表约束。）\u003c/p\u003e\n\u003cp\u003e用户定义的约束触发器（使用 CREATE CONSTRAINT TRIGGER 创建）也会在这个表中产生一项。\u003c/p\u003e\n\u003cp\u003e域上的检查约束也存储在这里。\u003c/p\u003e","doc":{"anchor":"id-1.10.4.15.6","file":"catalog-pg-constraint.html","lang":"en","sha256":"6a059ab6aa72666386c6400136ca2b9b96245587b99fbba608288ec0edc469c2","slug":"18"},"kind":"catalog","lang":"en","measured_attributes":true,"metadata_release":"18.6","runtime_columns":["oid","conname","connamespace","contype","condeferrable","condeferred","conenforced","convalidated","conrelid","contypid","conindid","conparentid","confrelid","confupdtype","confdeltype","confmatchtype","conislocal","coninhcount","connoinherit","conperiod","conkey","confkey","conpfeqop","conppeqop","conffeqop","confdelsetcols","conexclop","conbin"],"runtime_verified":false,"source":"english-manual","sources":[{"evidence":[{"build_id":107,"kind":"same-version-manual","locale":"zh-Hans","page":"catalog-pg-constraint.html","sha256":"d533bcda6058630dda0b36f26c8126ccb3ae6992cdbd1586b473519bec67f631","source_revision":"unknown:rendered-translation-baseline","translation_revision":"git:b1b500221dbe5437cfca004d6b04d3f6e422765d;html-sha256:08e987a66af27b98444a8057c256314eafa13611a3fb9e888214fc436824244b","version":"18"}],"kind":"catalog-bilingual-repair","prior_source_revision":"english-manuals:3228acb54b2d8175450a80630d8034e7e77963d9cb2978687ec81601e837adaf","version":"18"}],"zh_from":"same-version-manual"},"ManualEvidence":{"doc":{"anchor":"id-1.10.4.15.6","file":"catalog-pg-constraint.html","lang":"en","sha256":"6a059ab6aa72666386c6400136ca2b9b96245587b99fbba608288ec0edc469c2","slug":"18"},"sources":[{"evidence":[{"build_id":107,"kind":"same-version-manual","locale":"zh-Hans","page":"catalog-pg-constraint.html","sha256":"d533bcda6058630dda0b36f26c8126ccb3ae6992cdbd1586b473519bec67f631","source_revision":"unknown:rendered-translation-baseline","translation_revision":"git:b1b500221dbe5437cfca004d6b04d3f6e422765d;html-sha256:08e987a66af27b98444a8057c256314eafa13611a3fb9e888214fc436824244b","version":"18"}],"kind":"catalog-bilingual-repair","prior_source_revision":"english-manuals:3228acb54b2d8175450a80630d8034e7e77963d9cb2978687ec81601e837adaf","version":"18"}]},"MeasuredEvidence":{"measured_attributes":true,"metadata_release":"18.6","runtime_columns":["oid","conname","connamespace","contype","condeferrable","condeferred","conenforced","convalidated","conrelid","contypid","conindid","conparentid","confrelid","confupdtype","confdeltype","confmatchtype","conislocal","coninhcount","connoinherit","conperiod","conkey","confkey","conpfeqop","conppeqop","conffeqop","confdelsetcols","conexclop","conbin"],"runtime_verified":false}},"Text":{"Collection":"catalog","Key":"pg_constraint","SourceDatabase":"center","Version":"18","Locale":"en","Title":"pg_constraint","Summary":"The catalog pg_constraint stores check, not-null, primary key, unique, foreign key, and exclusion constraints on tables. (Column constraints are not treated specially. Every column constraint is equivalent to some table constraint.)\n\nUser-defined constraint triggers (created with CREATE CONSTRAINT TRIGGER) also give rise to an entry in this table.\n\nCheck constraints on domains are stored here, too.","BodyHTML":"\u003cp\u003eThe catalog pg_constraint stores check, not-null, primary key, unique, foreign key, and exclusion constraints on tables. (Column constraints are not treated specially. Every column constraint is equivalent to some table constraint.)\n\nUser-defined constraint triggers (created with CREATE CONSTRAINT TRIGGER) also give rise to an entry in this table.\n\nCheck constraints on domains are stored here, too.\u003c/p\u003e","SourceRevision":"catalog-bilingual-repair:3428b991c0a50aa15565f2c2fb7767a7235f864ea22d970eb5a75bca5e8da673","ContentHash":"8bd5e49b4a281df37231149156a4d0123ca05947da8dc2a24b5060a3101b7cf4","Payload":{"columns":[{"array_dimensions":0,"attnum":1,"description":"Row identifier","description_zh":"行标识符","documented":true,"documented_name":"oid","hidden":false,"name":"oid","not_null":true,"references":"","type":"oid","type_modifier":-1,"type_oid":26,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":2,"description":"Constraint name (not necessarily unique!)","description_zh":"约束名称（不一定唯一！）","documented":true,"documented_name":"conname","hidden":false,"name":"conname","not_null":true,"references":"","type":"name","type_modifier":-1,"type_oid":19,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":3,"description":"The OID of the namespace that contains this constraint","description_zh":"包含此约束的名字空间的 OID","documented":true,"documented_name":"connamespace","hidden":false,"name":"connamespace","not_null":true,"references":"pg_namespace.oid","type":"oid","type_modifier":-1,"type_oid":26,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":4,"description":"c = check constraint, f = foreign key constraint, n = not-null constraint, p = primary key constraint, u = unique constraint, t = constraint trigger, x = exclusion constraint","description_zh":"c = 检查约束，f = 外键约束，n = 非空约束，p = 主键约束，u = 唯一约束，t = 约束触发器，x = 排他约束","documented":true,"documented_name":"contype","hidden":false,"name":"contype","not_null":true,"references":"","type":"char","type_modifier":-1,"type_oid":18,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":5,"description":"Is the constraint deferrable?","description_zh":"该约束是否能被延迟？","documented":true,"documented_name":"condeferrable","hidden":false,"name":"condeferrable","not_null":true,"references":"","type":"bool","type_modifier":-1,"type_oid":16,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":6,"description":"Is the constraint deferred by default?","description_zh":"该约束是否默认被延迟？","documented":true,"documented_name":"condeferred","hidden":false,"name":"condeferred","not_null":true,"references":"","type":"bool","type_modifier":-1,"type_oid":16,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":7,"description":"Is the constraint enforced?","description_zh":"该约束是否会被强制执行？","documented":true,"documented_name":"conenforced","hidden":false,"name":"conenforced","not_null":true,"references":"","type":"bool","type_modifier":-1,"type_oid":16,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":8,"description":"Has the constraint been validated?","description_zh":"该约束是否已经验证？","documented":true,"documented_name":"convalidated","hidden":false,"name":"convalidated","not_null":true,"references":"","type":"bool","type_modifier":-1,"type_oid":16,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":9,"description":"The table this constraint is on; zero if not a table constraint","description_zh":"该约束所在的表，如果不是表约束则为零","documented":true,"documented_name":"conrelid","hidden":false,"name":"conrelid","not_null":true,"references":"pg_class.oid","type":"oid","type_modifier":-1,"type_oid":26,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":10,"description":"The domain this constraint is on; zero if not a domain constraint","description_zh":"该约束所在的域，如果不是域约束则为 0","documented":true,"documented_name":"contypid","hidden":false,"name":"contypid","not_null":true,"references":"pg_type.oid","type":"oid","type_modifier":-1,"type_oid":26,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":11,"description":"The index supporting this constraint, if it's a unique, primary key, foreign key, or exclusion constraint; else zero","description_zh":"如果该约束是唯一、主键、外键或排他约束，此列表示支持此约束的索引，否则为零","documented":true,"documented_name":"conindid","hidden":false,"name":"conindid","not_null":true,"references":"pg_class.oid","type":"oid","type_modifier":-1,"type_oid":26,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":12,"description":"The corresponding constraint of the parent partitioned table, if this is a constraint on a partition; else zero","description_zh":"如果这是一个分区中的约束，则是父分区表中对应的约束；否则为零","documented":true,"documented_name":"conparentid","hidden":false,"name":"conparentid","not_null":true,"references":"pg_constraint.oid","type":"oid","type_modifier":-1,"type_oid":26,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":13,"description":"If a foreign key, the referenced table; else zero","description_zh":"如果此约束是一个外键约束，此列为被引用的表，否则为零","documented":true,"documented_name":"confrelid","hidden":false,"name":"confrelid","not_null":true,"references":"pg_class.oid","type":"oid","type_modifier":-1,"type_oid":26,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":14,"description":"Foreign key update action code: a = no action, r = restrict, c = cascade, n = set null, d = set default","description_zh":"外键更新动作代码：a = 无动作，r = 限制，c = 级联，n = 置空，d = 置为默认值","documented":true,"documented_name":"confupdtype","hidden":false,"name":"confupdtype","not_null":true,"references":"","type":"char","type_modifier":-1,"type_oid":18,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":15,"description":"Foreign key deletion action code: a = no action, r = restrict, c = cascade, n = set null, d = set default","description_zh":"外键删除动作代码：a = 无动作，r = 限制，c = 级联，n = 置空，d = 置为默认值","documented":true,"documented_name":"confdeltype","hidden":false,"name":"confdeltype","not_null":true,"references":"","type":"char","type_modifier":-1,"type_oid":18,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":16,"description":"Foreign key match type: f = full, p = partial, s = simple","description_zh":"外键匹配类型：f = 完全，p = 部分，s = 简单","documented":true,"documented_name":"confmatchtype","hidden":false,"name":"confmatchtype","not_null":true,"references":"","type":"char","type_modifier":-1,"type_oid":18,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":17,"description":"This constraint is defined locally for the relation. Note that a constraint can be locally defined and inherited simultaneously.","description_zh":"此约束定义在关系本地。注意一个约束可以同时是本地定义和继承。","documented":true,"documented_name":"conislocal","hidden":false,"name":"conislocal","not_null":true,"references":"","type":"bool","type_modifier":-1,"type_oid":16,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":18,"description":"The number of direct inheritance ancestors this constraint has. A constraint with a nonzero number of ancestors cannot be dropped nor renamed.","description_zh":"该约束直接继承自多少个祖先。祖先数量非零的约束不能被删除，也不能被重命名。","documented":true,"documented_name":"coninhcount","hidden":false,"name":"coninhcount","not_null":true,"references":"","type":"int2","type_modifier":-1,"type_oid":21,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":19,"description":"This constraint is defined locally for the relation. It is a non-inheritable constraint.","description_zh":"为真表示此约束被定义在关系本地。它是一个不可继承约束。","documented":true,"documented_name":"connoinherit","hidden":false,"name":"connoinherit","not_null":true,"references":"","type":"bool","type_modifier":-1,"type_oid":16,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":20,"description":"This constraint is defined with WITHOUT OVERLAPS (for primary keys and unique constraints) or PERIOD (for foreign keys).","description_zh":"如果该约束被定义为 WITHOUT OVERLAPS（主键或唯一约束）或 PERIOD（外键），则为真。","documented":true,"documented_name":"conperiod","hidden":false,"name":"conperiod","not_null":true,"references":"","type":"bool","type_modifier":-1,"type_oid":16,"zh_from":"same-version-manual"},{"array_dimensions":1,"attnum":21,"description":"If a table constraint (including foreign keys, but not constraint triggers), list of the constrained columns","description_zh":"如果是一个表约束（包括外键但不包括约束触发器），此列是被约束列的列表","documented":true,"documented_name":"conkey","hidden":false,"name":"conkey","not_null":false,"references":"pg_attribute.attnum","type":"int2[]","type_modifier":-1,"type_oid":1005,"zh_from":"same-version-manual"},{"array_dimensions":1,"attnum":22,"description":"If a foreign key, list of the referenced columns","description_zh":"如果是一个外键，此列是被引用列的列表","documented":true,"documented_name":"confkey","hidden":false,"name":"confkey","not_null":false,"references":"pg_attribute.attnum","type":"int2[]","type_modifier":-1,"type_oid":1005,"zh_from":"same-version-manual"},{"array_dimensions":1,"attnum":23,"description":"If a foreign key, list of the equality operators for PK = FK comparisons","description_zh":"如果是一个外键，此列是用于 PK = FK 比较的等值操作符的列表","documented":true,"documented_name":"conpfeqop","hidden":false,"name":"conpfeqop","not_null":false,"references":"pg_operator.oid","type":"oid[]","type_modifier":-1,"type_oid":1028,"zh_from":"same-version-manual"},{"array_dimensions":1,"attnum":24,"description":"If a foreign key, list of the equality operators for PK = PK comparisons","description_zh":"如果是一个外键，此列是用于 PK = PK 比较的等值操作符的列表","documented":true,"documented_name":"conppeqop","hidden":false,"name":"conppeqop","not_null":false,"references":"pg_operator.oid","type":"oid[]","type_modifier":-1,"type_oid":1028,"zh_from":"same-version-manual"},{"array_dimensions":1,"attnum":25,"description":"If a foreign key, list of the equality operators for FK = FK comparisons","description_zh":"如果是一个外键，此列是用于 FK = FK 比较的等值操作符的列表","documented":true,"documented_name":"conffeqop","hidden":false,"name":"conffeqop","not_null":false,"references":"pg_operator.oid","type":"oid[]","type_modifier":-1,"type_oid":1028,"zh_from":"same-version-manual"},{"array_dimensions":1,"attnum":26,"description":"If a foreign key with a SET NULL or SET DEFAULT delete action, the columns that will be updated. If null, all of the referencing columns will be updated.","description_zh":"如果外键具有 SET NULL 或 SET DEFAULT 删除动作，则这里列出将被更新的列。如果为 NULL，则会更新所有引用列。","documented":true,"documented_name":"confdelsetcols","hidden":false,"name":"confdelsetcols","not_null":false,"references":"pg_attribute.attnum","type":"int2[]","type_modifier":-1,"type_oid":1005,"zh_from":"same-version-manual"},{"array_dimensions":1,"attnum":27,"description":"If an exclusion constraint or WITHOUT OVERLAPS primary key/unique constraint, list of the per-column exclusion operators.","description_zh":"如果是排他约束或 WITHOUT OVERLAPS 主键/唯一约束，则这里列出每列的排他操作符。","documented":true,"documented_name":"conexclop","hidden":false,"name":"conexclop","not_null":false,"references":"pg_operator.oid","type":"oid[]","type_modifier":-1,"type_oid":1028,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":28,"description":"If a check constraint, an internal representation of the expression. (It's recommended to use pg_get_constraintdef() to extract the definition of a check constraint.)","description_zh":"如果是一个检查约束，此列是表达式的一个内部表示。建议使用 pg_get_constraintdef() 提取检查约束的定义。","documented":true,"documented_name":"conbin","hidden":false,"name":"conbin","not_null":false,"references":"","type":"pg_node_tree","type_modifier":-1,"type_oid":194,"zh_from":"same-version-manual"}],"description":"The catalog pg_constraint stores check, not-null, primary key, unique, foreign key, and exclusion constraints on tables. (Column constraints are not treated specially. Every column constraint is equivalent to some table constraint.)\n\nUser-defined constraint triggers (created with CREATE CONSTRAINT TRIGGER) also give rise to an entry in this table.\n\nCheck constraints on domains are stored here, too."}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
