Re: Query Jumbling for CALL and SET utility statements

Julien Rouhaud <rjuju123@gmail.com>

From: Julien Rouhaud <rjuju123@gmail.com>
To: "Drouvot, Bertrand" <bertranddrouvot.pg@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>, Tom Lane <tgl@sss.pgh.pa.us>, Fujii Masao <masao.fujii@oss.nttdata.com>, Jeremy Schneider <schnjere@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-10-10T13:16:47Z
Lists: pgsql-hackers
Hi,

On Mon, Oct 10, 2022 at 03:04:57PM +0200, Drouvot, Bertrand wrote:
>
> On 10/7/22 6:13 AM, Michael Paquier wrote:
> >
> > Probably.  One part that may be tricky though is the location of the
> > constants we'd like to make generic, but perhaps this could be handled
> > by using a dedicated variable type that just maps to int?
>
> It looks to me that we'd also need to teach the perl parser which fields per
> statements struct need to be jumbled (or more probably which ones to exclude
> from the jumbling, for example funccall in CallStmt). Not sure yet how to
> teach the perl parser, but I'll build this list first to help decide for a
> right approach, unless you already have some thoughts about it?

Unless I'm missing something both can be handled using pg_node_attr()
annotations that already exists?



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.