OSDN Git Service

Ignore non-existent prepared statement in get_query_string. PG13
authorKyotaro Horiguchi <horikyota.ntt@gmail.com>
Wed, 9 Mar 2022 03:15:54 +0000 (12:15 +0900)
committerKyotaro Horiguchi <horikyota.ntt@gmail.com>
Wed, 9 Mar 2022 03:15:54 +0000 (12:15 +0900)
commit041f948d386b093d5f34f8af4582dc2ffe084abc
treec8ed857a713da44bbce212edd27d7083850c341b
parent7d53b124d4b2235dc933d1d925350319e081c1bf
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