OSDN Git Service

Support PostgreSQL 14
authorKyotaro Horiguchi <horikyota.ntt@gmail.com>
Tue, 5 Oct 2021 06:27:32 +0000 (15:27 +0900)
committerKyotaro Horiguchi <horikyota.ntt@gmail.com>
Wed, 6 Oct 2021 02:56:12 +0000 (11:56 +0900)
commit454f72a07c2bfa37816be9b223de17e01bdb23c8
tree524bbde54275a08eaa5351449b7a542735ddeed9
parent4ffa97e5d239467ee6d0a94d32355e984cfd77a2
Support PostgreSQL 14

In PostgreSQL 14, planner was restructured in regard to query string
passing.  This change allows us to remove fair amount of lines and
complexity that had been added as a struggle for retrieving proper
query string.

Two callbacks, post_parse_analyze_hook and ProcessUtility_hook are no
longer used.  get_query_string is removed altogether.  Also
current_hint_retrieved juggling, which was complex and fragile,
disappears. Now pg_hint_plan_planner alone can retrieve hint string by
looking into the given string.

In PostgreSQL 14, a new optimization item "memoize" is added. It is
not handled in this commit and leave it for a later commit.
14 files changed:
Makefile
SPECS/pg_hint_plan14.spec [moved from SPECS/pg_hint_plan13.spec with 74% similarity]
core.c
expected/init.out
expected/pg_hint_plan.out
expected/ut-A.out
expected/ut-S.out
make_join_rel.c
normalize_query.h
pg_hint_plan--1.4.sql [moved from pg_hint_plan--1.3.7.sql with 93% similarity]
pg_hint_plan.c
pg_hint_plan.control
pg_stat_statements.c
sql/pg_hint_plan.sql