1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-14 18:42:34 +03:00

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().
This commit is contained in:
Tom Lane
2009-05-12 00:56:05 +00:00
parent 6480c143ee
commit 0ada559187
12 changed files with 282 additions and 242 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.282 2009/05/07 22:58:28 tgl Exp $
* $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.283 2009/05/12 00:56:05 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -50,8 +50,6 @@
#include "nodes/nodeFuncs.h"
#include "nodes/parsenodes.h"
#include "optimizer/clauses.h"
#include "optimizer/plancat.h"
#include "optimizer/prep.h"
#include "parser/gramparse.h"
#include "parser/parse_clause.h"
#include "parser/parse_coerce.h"
@ -1873,7 +1871,6 @@ renameatt(Oid myrelid,
ListCell *child;
List *children;
/* this routine is actually in the planner */
children = find_all_inheritors(myrelid);
/*
@ -3292,7 +3289,6 @@ ATSimpleRecursion(List **wqueue, Relation rel,
ListCell *child;
List *children;
/* this routine is actually in the planner */
children = find_all_inheritors(relid);
/*
@ -3331,7 +3327,6 @@ ATOneLevelRecursion(List **wqueue, Relation rel,
ListCell *child;
List *children;
/* this routine is actually in the planner */
children = find_inheritance_children(relid);
foreach(child, children)