X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 90435D1D370 for ; Fri, 23 Apr 2004 11:18:40 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 27415-09 for ; Fri, 23 Apr 2004 11:18:43 -0300 (ADT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id A7C2FD1D08A for ; Fri, 23 Apr 2004 11:18:38 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i3NEIX4G023174; Fri, 23 Apr 2004 10:18:33 -0400 (EDT) To: Martin Marques Cc: pgsql-sql@postgresql.org Subject: Re: CONTEXT on PL/pgSQL In-reply-to: <200404231018.51461.martin@bugs.unl.edu.ar> References: <200404231018.51461.martin@bugs.unl.edu.ar> Comments: In-reply-to Martin Marques message dated "Fri, 23 Apr 2004 10:18:51 -0300" Date: Fri, 23 Apr 2004 10:18:33 -0400 Message-ID: <23173.1082729913@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200404/258 X-Sequence-Number: 17633 Martin Marques writes: > I have a simple function made with PL/pgSQL and when I call it I get this in > the logs: > 2004-04-23 10:15:32 [30669] LOG: statement: SELECT nodoSuperior(22) AS sup > 2004-04-23 10:15:32 [30669] LOG: statement: SELECT $1 > CONTEXT: PL/pgSQL function "nodosuperior" line 7 at assignment log_statement currently logs everything the parser sees, which includes SQL commands generated by plpgsql. Arguably these facilities should be separated, but until someone makes a serious effort to provide plpgsql debugging features, it's likely that nothing will be done about it. Right now this is almost the only technique available for seeing what's going on inside a plpgsql function, and crummy as it is, it's better than nothing... regards, tom lane