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:45:33 +0000 (13:45 +0900)
commit788cf4b133728f7a4c1e521ba135a7cd9fb777aa
tree91fdf2af7fe01232df50adfabc16b64926e67067
parentca7d497e3ebddf9c2a4837cc05baa501136fc364
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