postgresql/src/include/optimizer
Robert Haas 91f33a2ae9 Replace get_relation_info_hook with build_simple_rel_hook.
For a long time, PostgreSQL has had a get_relation_info_hook which
plugins can use to editorialize on the information that
get_relation_info obtains from the catalogs. However, this hook is
only called for baserels of type RTE_RELATION, and there is
potential utility in a similar call back for other types of
RTEs. This might have had utility even before commit
4020b370f2 added pgs_mask to
RelOptInfo, but it certainly has utility now.

So, move the callback up one level, deleting get_relation_info_hook and
adding build_simple_rel_hook instead. The new callback is called just
slightly later than before and with slightly different arguments, but it
should be fairly straightforward to adjust existing code that currently
uses get_relation_info_hook: the values previously available as
relationObjectId and inhparent are now available via rte->relid and
rte->inh, and calls where rte->rtekind != RTE_RELATION can be ignored if
desired.

Reviewed-by: Alexandra Wang <alexandra.wang.oss@gmail.com>
Discussion: http://postgr.es/m/CA%2BTgmoYg8uUWyco7Pb3HYLMBRQoO6Zh9hwgm27V39Pb6Pdf%3Dug%40mail.gmail.com
2026-03-09 09:48:26 -04:00
..
appendinfo.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
clauses.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
cost.h Allow for plugin control over path generation strategies. 2026-01-28 11:28:34 -05:00
extendplan.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
geqo.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
geqo_copy.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
geqo_gene.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
geqo_misc.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
geqo_mutation.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
geqo_pool.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
geqo_random.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
geqo_recombination.h Fix typos and inconsistencies in code and comments 2026-01-05 09:19:15 +09:00
geqo_selection.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
inherit.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
joininfo.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
optimizer.h Support grouping-expression references and GROUPING() in subqueries. 2026-03-06 13:40:55 -05:00
orclauses.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
paramassign.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
pathnode.h Replace get_relation_info_hook with build_simple_rel_hook. 2026-03-09 09:48:26 -04:00
paths.h Allow for plugin control over path generation strategies. 2026-01-28 11:28:34 -05:00
placeholder.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
plancat.h Replace get_relation_info_hook with build_simple_rel_hook. 2026-03-09 09:48:26 -04:00
planmain.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
planner.h Pass cursorOptions to planner_setup_hook. 2026-02-10 11:50:28 -05:00
prep.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
restrictinfo.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
subselect.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
tlist.h Update copyright for 2026 2026-01-01 13:24:10 -05:00