From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Sami Imseih <samimseih(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Improve explicit cursor handling in pg_stat_statements |
Date: | 2025-06-03 08:09:18 |
Message-ID: | aD6trk_mqCb9mel2@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Jun 02, 2025 at 02:44:36PM -0500, Sami Imseih wrote:
> Since the FETCH case is clear-cut, here is a patch that normalizes variable
> fetch sizes in a FETCH command. At a minimum, we can apply this patch.
> I’ve also added tests in pg_stat_statements utility.sql to demonstrate
> how queryIds
> are grouped for the variants of the FETCH statement.
{
NodeTag type;
FetchDirection direction; /* see above */
- long howMany; /* number of rows, or position argument */
+ /* number of rows, or position argument */
+ long howMany pg_node_attr(query_jumble_ignore);
char *portalname; /* name of portal (cursor) */
bool ismove; /* true if MOVE */
+ ParseLoc location pg_node_attr(query_jumble_location);
} FetchStmt;
In terms of silencing the numbers, that's fine by me. Now one issue
is that this also masks FETCH_ALL which is a specific keyword in the
grammar.
Should we offer something more consistent with DeallocateStmt, where
we have a boolean flag that would be set when ALL is specified,
included in the jumbling? This would mean two separate entries: one
for the constants and one for ALL.
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Shinya Kato | 2025-06-03 08:25:40 | Re: Add log_autovacuum_{vacuum|analyze}_min_duration |
Previous Message | Yura Sokolov | 2025-06-03 08:01:06 | Re: C11 / VS 2019 |