Details Query in pg_stat_statements

402 Views Asked by At

In pg_stat_statements output ("query" field):

SELECT * FROM users WHERE id = ?

How can I get the details of "?" from query in pg_stat_statements? Can anybody tell me about this, because I want to track if anyone execute some query. Can we also know which ip address this query execute from? so I can monitor if anyone make some modification data in database.

Thanks for the help.

1

There are 1 best solutions below

0
On

You can use pg_stat_monitor, it has that feature.