OSDN Git Service

Ignore non-existent prepared statement in get_query_string. PG11
authorKyotaro Horiguchi <horikyota.ntt@gmail.com>
Wed, 9 Mar 2022 03:04:22 +0000 (12:04 +0900)
committerKyotaro Horiguchi <horikyota.ntt@gmail.com>
Wed, 9 Mar 2022 03:18:23 +0000 (12:18 +0900)
commit904a4fcd793b1e2e4cf7c860f51383708ab21482
tree197bfd74c7cd63ba0724c5e358ecd047a31f46d5
parenta797bcf944d7f5c17d6d26cdaa2c57ef50b73a81
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