Re: Improve explicit cursor handling in pg_stat_statements

From: Sami Imseih <samimseih(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
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 11:40:08
Message-ID: CAA5RZ0tktrA3R-xb5+aeGGjWP9ZSqHspzicO-foEthDdP+5GJA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> 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.

Hmm, we could do that to differentiate the keyword ALL. I had a thought
earlier about differentiating the other keywords as well: FIRST, LAST,
BACKWARD, FORWARD, and ABSOLUTE. Initially, I thought it might
be a bit too much, but I do see the merit in this approach, as these are
syntactically different from their numeric counterparts.

We can accomplish this with just an extra field in FetchStmt, where each
of these keywords gets a distinct value.

What do you think?

--
Sami

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2025-06-03 11:41:13 Re: Logical Replication of sequences
Previous Message Robert Treat 2025-06-03 11:22:51 Re: Suggestions for improving \conninfo output in v18