pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Aaron Bono <postgresql@aranya.com>
Cc: sql pgsql <pgsql-sql@postgresql.org>
Subject: Re: Tracking Down Error in Stored Procedure
Date: Sat, 02 Dec 2006 01:20:59 -0500
Message-ID: <8476.1165040459@sss.pgh.pa.us> (raw)
In-Reply-To: <bf05e51c0612012148u1b1e8003i5706215097dca5ea@mail.gmail.com>
References: <bf05e51c0612012148u1b1e8003i5706215097dca5ea@mail.gmail.com>

"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



view thread (3+ messages)  latest in thread

Message-ID: <8476.1165040459@sss.pgh.pa.us>
Permalink:  ../8476.1165040459@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/8476.1165040459@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, postgresql@aranya.com
  Subject: Re: Tracking Down Error in Stored Procedure
  In-Reply-To: <8476.1165040459@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox