]> granicus.if.org Git - postgresql/commit
Add a relkind field to RangeTblEntry to avoid some syscache lookups.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 23 Feb 2011 00:23:23 +0000 (19:23 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 23 Feb 2011 00:24:40 +0000 (19:24 -0500)
commitbdca82f44d0e0168dece56cbd53b54ba142f328f
tree0a627b98d399ddce7b4523cf1d138e721a860f9d
parent1c51c7d5ffd407426f314b2cd317ef77f14efb1f
Add a relkind field to RangeTblEntry to avoid some syscache lookups.

The recent additions for FDW support required checking foreign-table-ness
in several places in the parse/plan chain.  While it's not clear whether
that would really result in a noticeable slowdown, it seems best to avoid
any performance risk by keeping a copy of the relation's relkind in
RangeTblEntry.  That might have some other uses later, anyway.
Per discussion.
19 files changed:
src/backend/catalog/dependency.c
src/backend/commands/copy.c
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/nodes/nodeFuncs.c
src/backend/nodes/outfuncs.c
src/backend/nodes/print.c
src/backend/nodes/readfuncs.c
src/backend/optimizer/path/allpaths.c
src/backend/optimizer/plan/planner.c
src/backend/parser/analyze.c
src/backend/parser/parse_relation.c
src/backend/parser/parse_target.c
src/backend/rewrite/rewriteHandler.c
src/backend/utils/adt/ri_triggers.c
src/backend/utils/adt/ruleutils.c
src/include/catalog/catversion.h
src/include/catalog/pg_class.h
src/include/nodes/parsenodes.h