Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id C53C364FD0F for ; Tue, 22 Jul 2008 09:17:53 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 43271-02 for ; Tue, 22 Jul 2008 09:17:38 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.248]) by postgresql.org (Postfix) with ESMTP id 7EFBB64FD23 for ; Tue, 22 Jul 2008 09:17:43 -0300 (ADT) Received: by an-out-0708.google.com with SMTP id d30so457431and.33 for ; Tue, 22 Jul 2008 05:17:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=+GheA08ANzx12/D9CwPbB0bBL1tgO9EXhTHomIf89ns=; b=L+rdp1tOI6NeX6qAe0hBxHzdGm4t0ygwL2LJSDXqecXUqPPpsFzhTuF4+zWQ1y83ng cCzjOyDyez+kogOqmi1g2IsLwHshRtF3e83CiNIOTUunRYe2n5PMJMoTfBWz3KTYzMkf 8IPkOT6PMfGDM3roR6/mHfP7O+4ffRT0C9Jjk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=vilNzyh5HqpMdu5aoB9gjKPS5sjpfQX9e7eegWbnltnUEEUImfW7hhRuaZjVPGNGOG tqF7oHmpGl0tHMDzr7TxbZMQoiDhDkSZ56g0mUnv5Hx64cmmyeXmaKH4Q2rtMzpQKWms pcNdSTMNiA4TaFX1K193mme9EEa4MvsWWzYdE= Received: by 10.100.214.19 with SMTP id m19mr2348312ang.1.1216729062203; Tue, 22 Jul 2008 05:17:42 -0700 (PDT) Received: by 10.100.105.4 with HTTP; Tue, 22 Jul 2008 05:17:42 -0700 (PDT) Message-ID: Date: Tue, 22 Jul 2008 17:47:42 +0530 From: "Rajesh Kumar Mallah" To: pgsql-admin@postgresql.org Subject: conditional logging based on client MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200807/183 X-Sequence-Number: 29793 Hi, We want to log all SQLs that has been executed by using psql client. we do not want to use .psql_history as it is distributed and may be deleted by users . The original objective is that we should be able to know what all hand made SQLs have been executed in past (which can date back as long as 1 year even) regds Mallah.