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:43:13 +0000 (13:43 +0900)
commitde7600e460d1f773cb6e4a8ff1b1a96668b84307
treeb1ac237815def1c44d13f708f6605001bdfdd92f
parentecf1a03257e804715fb6e028e878c97f140b7518
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