Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id D52109F9F75 for ; Fri, 8 Dec 2006 11:23:45 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 28290-04 for ; Fri, 8 Dec 2006 11:23:27 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id C9E319FA0FB for ; Fri, 8 Dec 2006 11:23:27 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id kB8FNPDm005130; Fri, 8 Dec 2006 10:23:25 -0500 (EST) To: "Yuan HOng" cc: pgsql-admin@postgresql.org Subject: Re: Statement logging for a particular database In-reply-to: <91320d220612080143u60bb5a94ne7f6703b67e9516@mail.gmail.com> References: <91320d220612080143u60bb5a94ne7f6703b67e9516@mail.gmail.com> Comments: In-reply-to "Yuan HOng" message dated "Fri, 08 Dec 2006 17:43:33 +0800" Date: Fri, 08 Dec 2006 10:23:25 -0500 Message-ID: <5129.1165591405@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/74 X-Sequence-Number: 23866 "Yuan HOng" 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