Commit 42224912 authored by Tom Lane's avatar Tom Lane

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.
parent 78f637c6
......@@ -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'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment