From postgresql@aranya.com Wed Jul 12 23:28:51 2006 X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id D0A429FB203 for ; Wed, 12 Jul 2006 20:28:51 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 99659-06 for ; Wed, 12 Jul 2006 20:28:43 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.172]) by postgresql.org (Postfix) with ESMTP id B8FB19FB1FC for ; Wed, 12 Jul 2006 20:28:43 -0300 (ADT) Received: by ug-out-1314.google.com with SMTP id m2so45190uge for ; Wed, 12 Jul 2006 16:28:42 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:mime-version:content-type:x-google-sender-auth; b=FQoQZeASydFP2/zhUCZeb6WRYUrWJTDG0JFoxxqJ0M8AEs/7IrD8Dw25v7RFwkmFF5+Xzm7zoPlOl/erfqev9veXUxJI0ZivArSLGb/JejV9osvvAMCXhc4FcMwxhqqfv7BK1paQYLBVGE4a9GLWCGL0o3w7JArEtYKE9JfRvog= Received: by 10.78.138.14 with SMTP id l14mr110196hud; Wed, 12 Jul 2006 16:28:42 -0700 (PDT) Received: by 10.78.29.15 with HTTP; Wed, 12 Jul 2006 16:28:42 -0700 (PDT) Message-ID: Date: Wed, 12 Jul 2006 18:28:42 -0500 From: "Aaron Bono" To: "Postgres SQL language list" Subject: Logging in Stored Procedure MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_57_1619953.1152746922132" X-Google-Sender-Auth: c9f98f653013dec3 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/197 X-Sequence-Number: 25771 ------=_Part_57_1619953.1152746922132 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline OK, maybe a stupid simple question but, how do you add logging to a stored procedure? My procedure is running but the results I get are not complete and I need to see better what is going wrong. The tool I use has a debugger but the debugger is barfing at a particular line that, when run without the debugger, works with no errors so I know there is something wrong with the debugger. Thanks, Aaron -- ================================================================== Aaron Bono Aranya Software Technologies, Inc. http://www.aranya.com ================================================================== ------=_Part_57_1619953.1152746922132 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline OK, maybe a stupid simple question but, how do you add logging to a stored procedure?  My procedure is running but the results I get are not complete and I need to see better what is going wrong.  The tool I use has a debugger but the debugger is barfing at a particular line that, when run without the debugger, works with no errors so I know there is something wrong with the debugger.

Thanks,
Aaron

--
==================================================================
   Aaron Bono
   Aranya Software Technologies, Inc.
   http://www.aranya.com
================================================================== ------=_Part_57_1619953.1152746922132-- From gsw@globexplorer.com Thu Jul 13 00:09:23 2006 X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 936A29FA92E for ; Wed, 12 Jul 2006 21:09:23 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 09922-05 for ; Wed, 12 Jul 2006 21:09:09 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from loki.globexplorer.com (loki.globexplorer.com [12.25.176.46]) by postgresql.org (Postfix) with ESMTP id 277789FB0D1 for ; Wed, 12 Jul 2006 21:09:08 -0300 (ADT) X-MimeOLE: Produced By Microsoft Exchange V6.0.6603.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Subject: Re: Logging in Stored Procedure Date: Wed, 12 Jul 2006 17:10:38 -0700 Message-ID: <71E37EF6B7DCC1499CEA0316A256832802B3E282@loki.wc.globexplorer.net> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [SQL] Logging in Stored Procedure thread-index: AcamEEjo9o7czmVXRaa7rWCtbw1bigAADMK/ References: From: "Gregory S. Williamson" To: "Aaron Bono" , "Postgres SQL language list" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/198 X-Sequence-Number: 25772 Well, perhaps the NOTICE functionality, e.g. RAISE NOTICE ''report id of % for date %'', rpt_rec.report_id, = rpt_rec.report_s_date; This will show on the terminal if running from a console, and also = writes to the log, IIRC. See the documentation for your version for = details. HTH, Greg Williamson DBA GlobeXplorer LLC -----Original Message----- From: pgsql-sql-owner@postgresql.org on behalf of Aaron Bono Sent: Wed 7/12/2006 4:28 PM To: Postgres SQL language list Cc:=09 Subject: [SQL] Logging in Stored Procedure OK, maybe a stupid simple question but, how do you add logging to a = stored procedure? My procedure is running but the results I get are not = complete and I need to see better what is going wrong. The tool I use has a = debugger but the debugger is barfing at a particular line that, when run without = the debugger, works with no errors so I know there is something wrong with = the debugger. Thanks, Aaron --=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Aaron Bono Aranya Software Technologies, Inc. http://www.aranya.com =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D !DSPAM:44b58e5178651804284693!