Re: [HACKERS] BUG: pg_stat_statements query normalization issueswith combined queries - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: [HACKERS] BUG: pg_stat_statements query normalization issueswith combined queries
Date
Msg-id alpine.DEB.2.20.1701132259260.15294@lancre
Whole thread Raw
In response to Re: [HACKERS] BUG: pg_stat_statements query normalization issues with combined queries  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] BUG: pg_stat_statements query normalization issues with combined queries  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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.



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [HACKERS] GSoC 2017
Next
From: Michael Paquier
Date:
Subject: Re: [HACKERS] Protect syscache from bloating with negative cache entries