Do some minor code refactoring in preparation for changing the APIs of
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 12 May 2009 00:56:05 +0000 (00:56 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 12 May 2009 00:56:05 +0000 (00:56 +0000)
commit3d8d53d227d5bff682c39c31fb4cc7bd6f02b40e
treeaa7e749d31eb502e621492534ad7406f5693711f
parentf55e49076d7ae20db052b7609a2e15099caa4dc6
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().
12 files changed:
src/backend/catalog/Makefile
src/backend/catalog/pg_inherits.c [new file with mode: 0644]
src/backend/commands/lockcmds.c
src/backend/commands/tablecmds.c
src/backend/optimizer/prep/prepunion.c
src/backend/optimizer/util/plancat.c
src/backend/parser/parse_coerce.c
src/backend/parser/parse_func.c
src/include/catalog/pg_inherits.h
src/include/optimizer/plancat.h
src/include/optimizer/prep.h
src/include/parser/parse_func.h