Thread: Postgres Table level statement logging
Hi,
I need to log the statements executed for a list of tables. It will be Data Modification statements like INSERT/UPDATE/DELETE on any of these tables. Please let me know if this is possible in postgres logging.
Regards,
Madhu
On Feb 7, 2012, at 5:42 AM, Madhu S R wrote: > I need to log the statements executed for a list of tables. It will be Data Modification statements like INSERT/UPDATE/DELETEon any of these tables. Please let me know if this is possible in postgres logging. Yes, this possible. You can set log_statement parameter. http://www.postgresql.org/docs/current/static/runtime-config-logging.html#GUC-LOG-STATEMENT Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation The Enterprise PostgreSQL Company Blog: http://vibhork.blogspot.com
Madhu S R <s_r_madhu@yahoo.co.in> wrote: > Hi, > > I need to log the statements executed for a list of tables. It will be Data > Modification statements like INSERT/UPDATE/DELETE on any of these tables. > Please let me know if this is possible in postgres logging. http://andreas.scherbaum.la/blog/archives/100-Log-Table-Changes-in-PostgreSQL-with-tablelog.html Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Linus Torvalds) "If I was god, I would recompile penguin with --enable-fly." (unknown) Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°
Hi,
I need to log DDL or MOD statements with current time when the statement executed. Please let me know if this is possible.
Regards,
Madhu
Need to enable log_line_prefix with timestamp "%t".
http://www.postgresql.org/docs/9.1/static/runtime-config-logging.html
On Thu, Feb 23, 2012 at 2:15 PM, Madhu S R <s_r_madhu@yahoo.co.in> wrote:
Hi,I need to log DDL or MOD statements with current time when the statement executed. Please let me know if this is possible.Regards,Madhu