OSDN Git Service

Give correct query location to generate_normalized_query.
authorKyotaro Horiguchi <horikyota.ntt@gmail.com>
Mon, 17 Feb 2020 04:15:39 +0000 (13:15 +0900)
committerKyotaro Horiguchi <horikyota.ntt@gmail.com>
Mon, 17 Feb 2020 04:44:33 +0000 (13:44 +0900)
commit64249fb2c99b235e6f66efec2eab8288c1042a18
treeebe9589876d6b3ce78d608ec8d5bc40313cdd9ad
parentbe1a68fd05ce4b307ba660cdfb2d74830a79267f
Give correct query location to generate_normalized_query.

There was a thinko about query_loc of generate_normalized_query which
causes a crash. For example a query is following a sequence of
semicolons (by \; in psql input) longer than the length after the last
placeholder to the end of the query, the function causes assertion
failure. Anyway prepared statements lose that value so we just pass 0
as the query_loc for consistent behavior.
expected/ut-T.out
pg_hint_plan.c
sql/ut-T.sql