pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pg_stat_statements in the query column I am not getting the exact query
2+ messages / 2 participants
[nested] [flat]

* pg_stat_statements in the query column I am not getting the exact query
@ 2018-08-19 19:15  nikhil raj <nikhilraj474@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: nikhil raj @ 2018-08-19 19:15 UTC (permalink / raw)
  To: pgsql-admin@postgresql.com; pgsql-general

Hello
I am using postgres 10.3 version current facing an issue related query
tracking whenever I run SELECT * FROM pg_stat_statements in the query
column I am not getting the exact query with values with variable but
instead I am getting $1, $2 in the query

example- "update ss set number=$1 where number =$2"

How can I get the whole exact query and what changes should I do it?

"update ss set number=245 where number =bill"

Thanks.

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: pg_stat_statements in the query column I am not getting the exact query
@ 2018-08-19 20:49  legrand legrand <legrand_legrand@hotmail.com>
  parent: nikhil raj <nikhilraj474@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: legrand legrand @ 2018-08-19 20:49 UTC (permalink / raw)
  To: pgsql-general

Hi,
This is the expected behavior, like that sql statements with différent
values are shared in pg_stat_statements ...
There is no parameter to change this, if you really want query paramèters
you néed to have a look at statements logging, but be carrefull this can
generate a huge volume of log files depending on your  workload ...

See log_statements at
https://www.postgresql.org/docs/9.5/static/runtime-config-logging.html

Regards
PAscal



--
Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2018-08-19 20:49 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-08-19 19:15 pg_stat_statements in the query column I am not getting the exact query nikhil raj <nikhilraj474@gmail.com>
2018-08-19 20:49 ` legrand legrand <legrand_legrand@hotmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox