pgsql: Do some minor code refactoring in preparation for changing the

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Do some minor code refactoring in preparation for changing the
Date: 2009-05-12 00:56:05
Message-ID: 20090512005605.E113B754067@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Do some minor code refactoring in preparation for changing the APIs of
find_inheritance_children() and find_all_inheritors(). I got annoyed that
these are buried inside the planner but mostly used elsewhere. So, create
a new file catalog/pg_inherits.c and put them there, along with a couple
of other functions that search pg_inherits.

The code that modifies pg_inherits is (still) in tablecmds.c --- it's
kind of entangled with unrelated code that modifies pg_depend and other
stuff, so pulling it out seemed like a bigger change than I wanted to make
right now. But this file provides a natural home for it if anyone ever
gets around to that.

This commit just moves code around; it doesn't change anything, except
I succumbed to the temptation to make a couple of trivial optimizations
in typeInheritsFrom().

Modified Files:
--------------
pgsql/src/backend/catalog:
Makefile (r1.69 -> r1.70)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/Makefile?r1=1.69&r2=1.70)
pgsql/src/backend/commands:
lockcmds.c (r1.21 -> r1.22)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/lockcmds.c?r1=1.21&r2=1.22)
tablecmds.c (r1.282 -> r1.283)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/tablecmds.c?r1=1.282&r2=1.283)
pgsql/src/backend/optimizer/prep:
prepunion.c (r1.168 -> r1.169)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/prep/prepunion.c?r1=1.168&r2=1.169)
pgsql/src/backend/optimizer/util:
plancat.c (r1.156 -> r1.157)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/util/plancat.c?r1=1.156&r2=1.157)
pgsql/src/backend/parser:
parse_coerce.c (r2.174 -> r2.175)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/parse_coerce.c?r1=2.174&r2=2.175)
parse_func.c (r1.213 -> r1.214)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/parse_func.c?r1=1.213&r2=1.214)
pgsql/src/include/catalog:
pg_inherits.h (r1.26 -> r1.27)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/pg_inherits.h?r1=1.26&r2=1.27)
pgsql/src/include/optimizer:
plancat.h (r1.52 -> r1.53)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/optimizer/plancat.h?r1=1.52&r2=1.53)
prep.h (r1.65 -> r1.66)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/optimizer/prep.h?r1=1.65&r2=1.66)
pgsql/src/include/parser:
parse_func.h (r1.64 -> r1.65)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/parser/parse_func.h?r1=1.64&r2=1.65)

Added Files:
-----------
pgsql/src/backend/catalog:
pg_inherits.c (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/pg_inherits.c?rev=1.1&content-type=text/x-cvsweb-markup)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2009-05-12 03:11:02 pgsql: Modify find_inheritance_children() and find_all_inheritors() to
Previous Message User Bmomjian 2009-05-12 00:26:42 pg-migrator - pg_migrator: Update install text.