Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 6852A63243D for ; Sun, 12 Sep 2010 00:49:19 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 24735-08 for ; Sun, 12 Sep 2010 03:49:11 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pz0-f46.google.com (mail-pz0-f46.google.com [209.85.210.46]) by mail.postgresql.org (Postfix) with ESMTP id 8FB7F6321B7 for ; Sun, 12 Sep 2010 00:49:11 -0300 (ADT) Received: by pzk34 with SMTP id 34so1626985pzk.19 for ; Sat, 11 Sep 2010 20:49:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=Cnq6xBh6Hybe3Qzi3L6nXfXM5tVOzcbbsdXPQQq2lRU=; b=yExuwfhHoGDMrfpzF0CqZW+OyQHG5HZG6dcuJLV/cYwa9l9of+AEOrK+l9KE/vxm3y 1a1ndHcm/KjRhd1H3AXObi34pUGDmM/6cJypxfoiQczKgZdp5yqFjrVHVZ+7iyFZ6LaF NHW7UBQZSo2/9ks+PcXY1enCt1fz4JXz41eAw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=nWwzf1G71F4n1zKklQYn8vHWjJXbb44RuhOPovgCcF8amLOneJ03/RvSWE32hSiEbG 6ClMRADGcxYogd+c+xk3/4b/JfJ+zqcmNekvBA1zeMeNJgnCFw51KAni0HcIv2kexu0x 4w04joiyzNsqUJWnyIRalLS2DT0MUAA8dghfg= Received: by 10.114.156.10 with SMTP id d10mr2104204wae.229.1284263350343; Sat, 11 Sep 2010 20:49:10 -0700 (PDT) Received: from [192.168.1.2] ([122.170.52.247]) by mx.google.com with ESMTPS id 33sm8514764wad.18.2010.09.11.20.49.07 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 11 Sep 2010 20:49:09 -0700 (PDT) Subject: Re: Tracing SQL statements that run against my DB Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset=us-ascii From: Vibhor Kumar In-Reply-To: Date: Sun, 12 Sep 2010 09:19:03 +0530 Cc: pgsql-admin@postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: <8A3FD0B8-32D8-4A00-A9C7-DD54F62EA0A4@gmail.com> References: To: Lucky Shag X-Mailer: Apple Mail (2.1081) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201009/73 X-Sequence-Number: 35617 On Sep 12, 2010, at 1:16 AM, Lucky Shag wrote: > I am running Postgres 8.4 on Windows 7. > =20 > I would like to view the SQL statements that are run against the = database. > =20 > What parameter do I need to set where, and where is trace output = written? > =20 you can use log_statement. Setting this parameter, postgresql will write = the SQL in postgresql log files.=20 For more information, follow the link given below: = http://www.postgresql.org/docs/8.4/static/runtime-config-logging.html#GUC-= LOG-STATEMENT Thanks & Regards, Vibhor Kumar (PCP & OCP) ITIL V3 Cerftified.