Home > Archive > PostgreSQL SQL > December 2006 > Re: Tracking Down Error in Stored Procedure









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Tracking Down Error in Stored Procedure
Tom Lane

2006-12-02, 5:15 am

"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

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com