X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 86627DB6F4 for ; Mon, 14 Nov 2005 21:21:17 -0400 (AST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 98827-06 for ; Tue, 15 Nov 2005 01:21:13 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from svr2.postgresql.org (svr2.postgresql.org [65.19.161.25]) by svr1.postgresql.org (Postfix) with ESMTP id 8AF07DAA21 for ; Mon, 14 Nov 2005 21:21:14 -0400 (AST) Received: from TWMAIL.ESNCC.COM (static-66-173-159-28.t1.cavtel.net [66.173.159.28]) by svr2.postgresql.org (Postfix) with ESMTP id 9E8A7F0B03 for ; Tue, 15 Nov 2005 01:21:17 +0000 (GMT) Received: from spawar2i8uvlb9 ([150.125.117.63]) by TWMAIL.ESNCC.COM with Microsoft SMTPSVC(5.0.2195.6713); Mon, 14 Nov 2005 20:21:14 -0500 From: "Lane Van Ingen" To: Subject: How to Log SELECT Statements Having Errors Date: Mon, 14 Nov 2005 20:17:47 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.181 Importance: Normal X-OriginalArrivalTime: 15 Nov 2005 01:21:14.0420 (UTC) FILETIME=[DEE07740:01C5E982] X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.029 required=5 tests=[AWL=0.029] X-Spam-Score: 0.029 X-Spam-Level: X-Archive-Number: 200511/116 X-Sequence-Number: 23367 We are putting a new application on PostgreSQL 8.0.1 (Windows 2003); we are coming off of MySQL, and are having a hard time finding all of the offending SQL calls. It would help a great deal if I could log the content of any SQL calls that fail. Am only interested in SELECT statements. Noticed the following: (1) The PostgreSQL manual says that config parm 'log_statement' does not appear to handle SELECT statements; true? (2) Noticed that config parm 'log_min_error_statement' might do it, but not sure what each of the DEBUG* and other parameters will buy me vs ERROR. I want any statement issued by a client that cannot be executed due to an SQL error of any kind. Can someone advise on this ?