Search Postgresql Archives

How to log query parameters instead of variables with log_min_duration_statement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I am logging long queries with log_min_duration_statement but would like to see the parameters for parameterized queries. Eg…

 

Jun 28 10:21:49 dbs1 postgres[20866]: [2-1] LOG:  duration: 6625.543 ms  execute PRSTMT1405204512-1371060978/PORTAL1405204512-1371060978: SELECT COUNT(*)

Jun 28 10:21:49 dbs1 postgres[20866]: [2-2]        FROM "XYZ123" AS "T0"

Jun 28 10:21:49 dbs1 postgres[20866]: [2-3]        WHERE ("T0"."Id" = $1)

 

I’d like to log or find out what $1 was from the postgresql server side, not the application side. Is this possible?

Best Regards,

Max Williams


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux