From: Tom Lane Date: Wed, 17 Dec 2003 22:11:30 +0000 (+0000) Subject: information_schema.constraint_column_usage and key_column_usage should X-Git-Tag: REL8_0_0BETA1~1502 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=422249120daceb216c7f36cd23c8f5d28e51bf1d;p=postgresql information_schema.constraint_column_usage and key_column_usage should not discriminate against system columns, since we support constraints on system columns, and in fact constraints on OID are moderately useful. --- diff --git a/src/backend/catalog/information_schema.sql b/src/backend/catalog/information_schema.sql index 9c651f9c0f..db4d79f6de 100644 --- a/src/backend/catalog/information_schema.sql +++ b/src/backend/catalog/information_schema.sql @@ -4,7 +4,7 @@ * * Copyright 2003, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/backend/catalog/information_schema.sql,v 1.20 2003/12/16 14:57:20 petere Exp $ + * $PostgreSQL: pgsql/src/backend/catalog/information_schema.sql,v 1.21 2003/12/17 22:11:30 tgl Exp $ */ /* @@ -434,7 +434,6 @@ CREATE VIEW constraint_column_usage AS AND c.connamespace = nc.oid AND c.contype = 'c' AND r.relkind = 'r' - AND a.attnum > 0 AND NOT a.attisdropped UNION ALL @@ -448,7 +447,6 @@ CREATE VIEW constraint_column_usage AS AND nc.oid = c.connamespace AND (CASE WHEN c.contype = 'f' THEN r.oid = c.confrelid AND c.confkey[pos.n] = a.attnum ELSE r.oid = c.conrelid AND c.conkey[pos.n] = a.attnum END) - AND a.attnum > 0 AND NOT a.attisdropped AND c.contype IN ('p', 'u', 'f') AND r.relkind = 'r' @@ -683,7 +681,6 @@ CREATE VIEW key_column_usage AS AND r.oid = c.conrelid AND nc.oid = c.connamespace AND c.conkey[pos.n] = a.attnum - AND a.attnum > 0 AND NOT a.attisdropped AND c.contype IN ('p', 'u', 'f') AND r.relkind = 'r'