Re: [PATCH] Query Jumbling for CALL and SET utility statements

Julien Rouhaud <rjuju123@gmail.com>

From: Julien Rouhaud <rjuju123@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Jeremy Schneider <schnjere@amazon.com>, "Drouvot, Bertrand" <bdrouvot@amazon.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Pavel Stehule <pavel.stehule@gmail.com>, Andres Freund <andres@anarazel.de>, "Imseih (AWS), Sami" <simseih@amazon.com>
Date: 2022-09-08T06:50:12Z
Lists: pgsql-hackers
On Thu, Sep 08, 2022 at 02:23:19PM +0900, Michael Paquier wrote:
> On Wed, Sep 07, 2022 at 06:19:42PM -0700, Jeremy Schneider wrote:
> > I didn't fully debug yet, but here's the backtrace on my 14.4 build with
> > the patch
> 
> What happens on HEAD?  That would be the target branch for a new
> feature.

It would be the same AFAICS.  From v3:

+		case T_VariableSetStmt:
+			{
+				VariableSetStmt *stmt = (VariableSetStmt *) node;
+
+				APP_JUMB_STRING(stmt->name);
+				JumbleExpr(jstate, (Node *) stmt->args);
+			}

For a RESET ALL command stmt->name is NULL.



Commits

  1. Show values of SET statements as constants in pg_stat_statements

  2. Teach contrib/pg_stat_statements to handle multi-statement commands better.