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

From Tom Lane
Subject Re: Tracking Down Error in Stored Procedure
Date
Msg-id 8476.1165040459@sss.pgh.pa.us
Whole thread Raw
In response to Tracking Down Error in Stored Procedure  ("Aaron Bono" <postgresql@aranya.com>)
Responses Re: Tracking Down Error in Stored Procedure  ("Aaron Bono" <postgresql@aranya.com>)
List pgsql-sql
"Aaron Bono" <postgresql@aranya.com> 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


pgsql-sql by date:

Previous
From: "Aaron Bono"
Date:
Subject: Tracking Down Error in Stored Procedure
Next
From: "Aaron Bono"
Date:
Subject: Re: Tracking Down Error in Stored Procedure