Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 2932E9F9FDA for ; Sat, 2 Dec 2006 02:21:13 -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 28822-09 for ; Sat, 2 Dec 2006 02:21:09 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 405A49F9ED7 for ; Sat, 2 Dec 2006 02:21:09 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id kB26KxsR008477; Sat, 2 Dec 2006 01:20:59 -0500 (EST) To: "Aaron Bono" cc: "sql pgsql" Subject: Re: Tracking Down Error in Stored Procedure In-reply-to: References: Comments: In-reply-to "Aaron Bono" message dated "Fri, 01 Dec 2006 23:48:12 -0600" Date: Sat, 02 Dec 2006 01:20:59 -0500 Message-ID: <8476.1165040459@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/22 X-Sequence-Number: 26978 "Aaron Bono" writes: > 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? It's the 200th line in the function body string. IIRC there is a special case to not count a leading newline in the body string, so that the counting goes like CREATE FUNCTION foo ... RETURNS ... AS $$ DECLARE -- this is line 1 or without exploiting the special case CREATE FUNCTION foo ... RETURNS ... AS $$DECLARE -- this is line 1 regards, tom lane