Forum OpenACS Development: HOw to calculate line numbers in plpgsql

I got this error message:

NOTICE:  plpgsql: ERROR during compile of static_page__new_folder near line 54
[26/Jun/2001:21:02:55][1485.6150][-conn1-] Error: Ns_PgExec: result status: 7 message: ERROR:  parse error at or near "("

[26/Jun/2001:21:02:55][1485.6150][-conn1-] Error: dbinit: error(localhost::openacs-4,ERROR:  parse error at or near "("
): '

How do I figure out where line 54 of a pl/pgsql procedure is? Do I start from the function(  or begin?


Posted by Dan Wickstrom on
The 'declare' statement is line 1, or if there is no 'declare' statement then start at the 'begin' statement.

I've also created a view that you can use to look at the numbered source for pl/pgsql functions. Do the following:

select * from acs_func_defs where fname = 'static_page__new_folder';
Posted by Dave Bauer on
Wow,  great! Let's put that in the porting guide.

I found the error, I was looking in the wrong place.  Thanks alot.