Re: Finding line of bug in sql function - Mailing list pgsql-general

From Rory Campbell-Lange
Subject Re: Finding line of bug in sql function
Date
Msg-id 20030528132113.GA5089@campbell-lange.net
Whole thread Raw
In response to Re: Finding line of bug in sql function  (Rory Campbell-Lange <rory@campbell-lange.net>)
Responses Re: Finding line of bug in sql function
List pgsql-general
As far as the function goes, I now know the difference between ELSIFs
and ELSE IFs. The function is working now. Still interested in how to
find the bug line using vim though.

Thanks,
R

On 28/05/03, Rory Campbell-Lange (rory@campbell-lange.net) wrote:
> Thanks to everyone's help, I've found that I wasn't quoting my 's
> properly. Sorry for the newbie issue.
>
> Still, my original question was about how to find the error line in
> function after loading it from file.
>
> For instance the function I originally wrote about still has a bug (even
> after quoting properly!). psql reports:
>
> temporary=> \i sql_functions/fn_c2c_transports_person.sql
> CREATE FUNCTION
> temporary=> select fn_c2c_transports_person (1, 'email', 'validate');
> WARNING:  plpgsql: ERROR during compile of fn_c2c_transports_person near line 92
> ERROR:  parse error at or near "ELSE"
>
> Is this line 92, starting at the BEGIN statement? Will the lines of the
> function accord with the way I laid out the input file? Does the parser
> recognise comments and blank lines?

--
Rory Campbell-Lange
<rory@campbell-lange.net>
<www.campbell-lange.net>

pgsql-general by date:

Previous
From: Rory Campbell-Lange
Date:
Subject: Re: Finding line of bug in sql function
Next
From: Mariusz Jadczak
Date:
Subject: Re: Finding line of bug in sql function