pgsql: Add system catalog columns pg_constraint.conindid and

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Add system catalog columns pg_constraint.conindid and
Date: 2009-07-28 02:56:31
Message-ID: 20090728025631.3D04475331E@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Add system catalog columns pg_constraint.conindid and pg_trigger.tgconstrindid.

conindid is the index supporting a constraint. We can use this not only for
unique/primary-key constraints, but also foreign-key constraints, which
depend on the unique index that constrains the referenced columns.
tgconstrindid is just copied from the constraint's conindid field, or is
zero for triggers not associated with constraints.

This is mainly intended as infrastructure for upcoming patches, but it has
some virtue in itself, since it exposes a relationship that you formerly
had to grovel in pg_depend to determine. I simplified one information_schema
view accordingly. (There is a pg_dump query that could also use conindid,
but I left it alone because it wasn't clear it'd get any faster.)

Modified Files:
--------------
pgsql/doc/src/sgml:
catalogs.sgml (r2.201 -> r2.202)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/catalogs.sgml?r1=2.201&r2=2.202)
trigger.sgml (r1.56 -> r1.57)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/trigger.sgml?r1=1.56&r2=1.57)
pgsql/src/backend/catalog:
heap.c (r1.354 -> r1.355)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/heap.c?r1=1.354&r2=1.355)
index.c (r1.318 -> r1.319)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/index.c?r1=1.318&r2=1.319)
information_schema.sql (r1.57 -> r1.58)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/information_schema.sql?r1=1.57&r2=1.58)
pg_constraint.c (r1.46 -> r1.47)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/pg_constraint.c?r1=1.46&r2=1.47)
pgsql/src/backend/commands:
tablecmds.c (r1.291 -> r1.292)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/tablecmds.c?r1=1.291&r2=1.292)
trigger.c (r1.248 -> r1.249)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/trigger.c?r1=1.248&r2=1.249)
typecmds.c (r1.135 -> r1.136)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/typecmds.c?r1=1.135&r2=1.136)
pgsql/src/backend/tcop:
utility.c (r1.311 -> r1.312)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/tcop/utility.c?r1=1.311&r2=1.312)
pgsql/src/include/catalog:
catversion.h (r1.532 -> r1.533)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/catversion.h?r1=1.532&r2=1.533)
pg_constraint.h (r1.31 -> r1.32)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/pg_constraint.h?r1=1.31&r2=1.32)
pg_trigger.h (r1.33 -> r1.34)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/pg_trigger.h?r1=1.33&r2=1.34)
pgsql/src/include/commands:
trigger.h (r1.73 -> r1.74)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/commands/trigger.h?r1=1.73&r2=1.74)
pgsql/src/include/utils:
rel.h (r1.114 -> r1.115)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/rel.h?r1=1.114&r2=1.115)

Browse pgsql-committers by date

  From Date Subject
Next Message User Kasahara 2009-07-28 08:25:06 pgstatsinfo - pg_statsinfo: - Move all tables/views/functions on
Previous Message Tom Lane 2009-07-27 14:14:52 Re: Re: [COMMITTERS] pgsql: Reserve the shared memory region during backend startup on