Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id D1FEE9FA1A1 for ; Sat, 2 Dec 2006 01:48:18 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 20810-01 for ; Sat, 2 Dec 2006 01:48:14 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.189]) by postgresql.org (Postfix) with ESMTP id 923D79F9F66 for ; Sat, 2 Dec 2006 01:48:14 -0400 (AST) Received: by nf-out-0910.google.com with SMTP id x4so3856669nfb for ; Fri, 01 Dec 2006 21:48:13 -0800 (PST) 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=PblBjF68364a8UhiIpIbtmUIFxJW4Nxt4Z1GuHKtgBKXEpTVWmNsCfdnv99FyvFR9GJQjNvtDEGWIcl64YqOq0qCyMcXqfkyezEIjOgS+QqkpDzpzevRvj8E5xa6pGu1xzPuNv3sUEpUmgDFLd7x5sghC4LH9Dkvbzhr1YU3VTw= Received: by 10.78.149.13 with SMTP id w13mr5554785hud.1165038492760; Fri, 01 Dec 2006 21:48:12 -0800 (PST) Received: by 10.78.136.6 with HTTP; Fri, 1 Dec 2006 21:48:12 -0800 (PST) Message-ID: Date: Fri, 1 Dec 2006 23:48:12 -0600 From: "Aaron Bono" To: "sql pgsql" Subject: Tracking Down Error in Stored Procedure MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_8348_1050119.1165038492733" X-Google-Sender-Auth: 960d9865705894b7 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/21 X-Sequence-Number: 26977 ------=_Part_8348_1050119.1165038492733 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline I have a nightly batch that runs a stored procedure/function. This procedure has a habit of erroring on the first of each month and gives the following: ERROR: cannot EXECUTE a null querystring CONTEXT: PL/pgSQL function "update_web_site_hits_fn" line 200 at execute statement My question is this: What is line 200? Is it the 200th line after the CREATE part of the stored procedure? Or is it the 200th line after the BEGIN? Or maybe something else? I have a possible culprit at both places and don't know which one is the offender. Also, if the EXECUTE is over many lines, is line 200 the first line of the EXECUTE statement or the ending line of the EXECUTE (where the ; is)? I am using PostgreSQL 8.1.3 on CENTOS Linux. Thanks, Aaron -- ================================================================== Aaron Bono Aranya Software Technologies, Inc. http://www.aranya.com http://codeelixir.com ================================================================== ------=_Part_8348_1050119.1165038492733 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I have a nightly batch that runs a stored procedure/function.  This procedure has a habit of erroring on the first of each month and gives the following:

ERROR:  cannot EXECUTE a null querystring
CONTEXT:  PL/pgSQL function "update_web_site_hits_fn" line 200 at execute statement

My question is this:  What is line 200?  Is it the 200th line after the CREATE part of the stored procedure?  Or is it the 200th line after the BEGIN?  Or maybe something else?  I have a possible culprit at both places and don't know which one is the offender.

Also, if the EXECUTE is over many lines, is line 200 the first line of the EXECUTE statement or the ending line of the EXECUTE (where the ; is)?

I am using PostgreSQL 8.1.3 on CENTOS Linux.

Thanks,
Aaron

--
==================================================================
   Aaron Bono
   Aranya Software Technologies, Inc.
   http://www.aranya.com
   http://codeelixir.com
================================================================== ------=_Part_8348_1050119.1165038492733--