> > The FETCH and CLOSE are already not clear to what underlying SQL > > they are referring to, and there is not much chance to actually > > improve that unless > > we track a cursor queryId in pg_stat_statements ( at that point we can show > > that > > FETCH or CLOSE refer to this specific cursor statement ).
> I don't really have an issue for FETCH with the number as the name is 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. -- Sami Imseih Amazon Web Services (AWS)
v2-0001-Normalize-variable-fetch-sizes-in-a-FETCH-command.patch
Description: Binary data