Re: stored procedures vs pg_stat_statements

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Merlin Moncure <mmoncure@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-12-23T21:58:13Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Show parameters of CALL as constants in pg_stat_statements

Merlin Moncure <mmoncure@gmail.com> writes:
> Can this simply be disabled for stored procedures as a special case?  I'm
> hoping this might do something useful that is also safe.  Curious if anyone
> has any thoughts on this.

No, I don't think that would help.  The restriction on utility
statements would cover CREATE PROCEDURE/FUNCTION, not calls
of those things which is what I suppose you care about.

Do you have pg_stat_statements.track set to "all"?  That should
allow statements within stored procedures to be tracked, which
again is what I'm guessing you care about.

			regards, tom lane