Tracking Down Error in Stored Procedure - Mailing list pgsql-sql

From Aaron Bono
Subject Tracking Down Error in Stored Procedure
Date
Msg-id bf05e51c0612012148u1b1e8003i5706215097dca5ea@mail.gmail.com
Whole thread Raw
Responses Re: Tracking Down Error in Stored Procedure  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
I have a nightly batch that runs a stored procedure/function.  This procedure has a habit of erroring on the first of
eachmonth and gives the following:<br /><br />ERROR:  cannot EXECUTE a null querystring<br />CONTEXT:  PL/pgSQL
function"update_web_site_hits_fn" line 200 at execute statement<br /><br />My question is this:  What is line 200?  Is
itthe 200th line after the CREATE part of the stored procedure?  Or is it the 200th line after the BEGIN?  Or maybe
somethingelse?  I have a possible culprit at both places and don't know which one is the offender. <br /><br />Also, if
theEXECUTE is over many lines, is line 200 the first line of the EXECUTE statement or the ending line of the EXECUTE
(wherethe ; is)?<br /><br />I am using PostgreSQL 8.1.3 on CENTOS Linux.<br /><br />Thanks,<br /> Aaron<br clear="all"
/><br/>-- <br />==================================================================<br />   Aaron Bono<br />   Aranya
SoftwareTechnologies, Inc.<br />   <a href="http://www.aranya.com">http://www.aranya.com</a><br />    <a
href="http://codeelixir.com">http://codeelixir.com</a><br
/>================================================================== 

pgsql-sql by date:

Previous
From: "Aaron Bono"
Date:
Subject: Re: Problem inserting composite type values
Next
From: Tom Lane
Date:
Subject: Re: Tracking Down Error in Stored Procedure