Re: BUG: pg_stat_statements query normalization issues with combined queries
Fabien COELHO <coelho@cri.ensmp.fr>
From: Fabien COELHO <coelho@cri.ensmp.fr>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Craig Ringer <craig.ringer@2ndquadrant.com>,
Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>,
Robert Haas <robertmhaas@gmail.com>,
PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2017-01-13T22:22:57Z
Lists: pgsql-hackers
> Here's a v2 that does it like that. Applies, compiles, overall & pgss make check are both ok. Personnally I find having RawStmt only for the top parsed statement cleaner, and it significantly reduces changes in the parser, as expected, without inducing too much changes elsewhere. Same comment as on v1: I'm wondering about the actual coverage of the default tests... I cannot say I understand everything. > It ends up being about 30 fewer lines of code overall, despite there > being four places that have to make ad-hoc RawStmt nodes. On the whole > I feel like this is cleaner, I agree: Better typing, more homogeneous code (PlannedStmt for all), less ad-hoc checks to work around utility statements... -- Fabien.
Commits
-
Teach contrib/pg_stat_statements to handle multi-statement commands better.
- 83f2061dd037 10.0 landed
-
Change representation of statement lists, and add statement location info.
- ab1f0c822571 10.0 landed
-
Revert my bad decision of about a year ago to make PortalDefineQuery
- 1591fcbec77f 8.4.0 cited