Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4222491

Browse files
committed
information_schema.constraint_column_usage and key_column_usage should
not discriminate against system columns, since we support constraints onsystem columns, and in fact constraints on OID are moderately useful.
1 parent78f637c commit4222491

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

‎src/backend/catalog/information_schema.sql

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Copyright 2003, PostgreSQL Global Development Group
66
*
7-
* $PostgreSQL: pgsql/src/backend/catalog/information_schema.sql,v 1.20 2003/12/16 14:57:20 petere Exp $
7+
* $PostgreSQL: pgsql/src/backend/catalog/information_schema.sql,v 1.21 2003/12/17 22:11:30 tgl Exp $
88
*/
99

1010
/*
@@ -434,7 +434,6 @@ CREATE VIEW constraint_column_usage AS
434434
ANDc.connamespace=nc.oid
435435
ANDc.contype='c'
436436
ANDr.relkind='r'
437-
ANDa.attnum>0
438437
AND NOTa.attisdropped
439438

440439
UNION ALL
@@ -448,7 +447,6 @@ CREATE VIEW constraint_column_usage AS
448447
ANDnc.oid=c.connamespace
449448
AND (CASE WHENc.contype='f' THENr.oid=c.confrelidANDc.confkey[pos.n]=a.attnum
450449
ELSEr.oid=c.conrelidANDc.conkey[pos.n]=a.attnum END)
451-
ANDa.attnum>0
452450
AND NOTa.attisdropped
453451
ANDc.contypeIN ('p','u','f')
454452
ANDr.relkind='r'
@@ -683,7 +681,6 @@ CREATE VIEW key_column_usage AS
683681
ANDr.oid=c.conrelid
684682
ANDnc.oid=c.connamespace
685683
ANDc.conkey[pos.n]=a.attnum
686-
ANDa.attnum>0
687684
AND NOTa.attisdropped
688685
ANDc.contypeIN ('p','u','f')
689686
ANDr.relkind='r'

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp