Re: Ok, how do I debug THIS? - Mailing list pgsql-sql

From Tom Lane
Subject Re: Ok, how do I debug THIS?
Date
Msg-id 19270.1052868140@sss.pgh.pa.us
Whole thread Raw
In response to Re: Ok, how do I debug THIS?  (Josh Berkus <josh@agliodbs.com>)
Responses Re: Ok, how do I debug THIS?  (Larry Rosenman <ler@lerctr.org>)
List pgsql-sql
Josh Berkus <josh@agliodbs.com> writes:
>> I just did a head.  Note the line count above.  It's only 147
>> lines, but the error refers to line 206.

> Obviously postgres is counting lines differently from you.

Just FYI, I noticed the other day while testing some plpgsql changes
that the 7.3 plpgsql seems to double-count newlines appearing inside
quoted literals --- that is, if you have a syntax error appearing after
a multiline literal, the reported line number will be too large.  This
seems to explain Larry's bizarre message, since most of the function
was being taken as a multiline literal.

The reason I noticed this was that the updated version counts correctly,
and thus gave different answers.  I don't know exactly where the bug
really was --- the changes involved ripping out the use of yylineno
entirely, so I did not look to see just where the double counting had
been happening.
        regards, tom lane



pgsql-sql by date:

Previous
From: Larry Rosenman
Date:
Subject: Re: Postgresql and Top N Analysis?
Next
From: David Siegal
Date:
Subject: Calculating Percentages