OSDN Git Service

Ignore non-existent prepared statement in get_query_string. PG12
authorKyotaro Horiguchi <horikyota.ntt@gmail.com>
Wed, 9 Mar 2022 02:38:31 +0000 (11:38 +0900)
committerKyotaro Horiguchi <horikyota.ntt@gmail.com>
Wed, 9 Mar 2022 03:18:04 +0000 (12:18 +0900)
commit2d5b8cdad8ba623b3313b23a0b45712438ff68d8
tree462eff3f8c453fed9faa37a216db4819fb9d1ec6
parentafe29b4bff1516f2e3391cb4fe8a9774e7719725
Ignore non-existent prepared statement in get_query_string.

CREATE FUNCTION of SQL function uses post_parse_analyze_hook during
validation.  If the function contained EXECUTE <prepared statement>,
not only that statement may be nonexistent, but also there's no need
of the query string at that point.

Since execution of nonexistent prepared statement ends with failure
sooner or later, we can safely ignore that.

Backpatch to pg_hint_plan10 that are before the core's EOL.
expected/pg_hint_plan.out
pg_hint_plan.c
sql/pg_hint_plan.sql