pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Statement logging for a particular database
2+ messages / 2 participants
[nested] [flat]

* Statement logging for a particular database
@ 2006-12-08 09:43 Yuan HOng <hongyuan1306@gmail.com>
  2006-12-08 15:23 ` Re: Statement logging for a particular database Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: Yuan HOng @ 2006-12-08 09:43 UTC (permalink / raw)
  To: pgsql-admin

I am running PostgreSQL 7.4, and I'd like to turn on statement logging
for only one database rather than the server instance.

The log_statement = true option doesn't distinguish between databases.
Is there another option? In 8.1 one can put the database name into the
log string for filtering, but this doesn't seem to be available in
7.4.

-- 
Hong Yuan

大管家网上建材超市
装修装潢建材一站式购物
http://www.homemaster.cn


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

* Re: Statement logging for a particular database
  2006-12-08 09:43 Statement logging for a particular database Yuan HOng <hongyuan1306@gmail.com>
@ 2006-12-08 15:23 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2006-12-08 15:23 UTC (permalink / raw)
  To: Yuan HOng <hongyuan1306@gmail.com>; +Cc: pgsql-admin

"Yuan HOng" <hongyuan1306@gmail.com> writes:
> I am running PostgreSQL 7.4, and I'd like to turn on statement logging
> for only one database rather than the server instance.

> The log_statement = true option doesn't distinguish between databases.
> Is there another option?

This should work:
	ALTER DATABASE foo SET log_statement = true

			regards, tom lane



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


end of thread, other threads:[~2006-12-08 15:23 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-12-08 09:43 Statement logging for a particular database Yuan HOng <hongyuan1306@gmail.com>
2006-12-08 15:23 ` Tom Lane <tgl@sss.pgh.pa.us>

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