From: | Larry Rosenman <ler(at)lerctr(dot)org> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, josh(at)agliodbs(dot)com |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Ok, how do I debug THIS? |
Date: | 2003-05-13 23:25:54 |
Message-ID: | 26910000.1052868353@lerlaptop.lerctr.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
--On Tuesday, May 13, 2003 19:22:20 -0400 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
wrote:
> Josh Berkus <josh(at)agliodbs(dot)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.
AH! Thank You for the explanation. (the quoting rules get weird, and I
haven't done much
PL/pgSQL coding (as if you couldn't tell).).
>
> 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.
Makes sense. Thanks again!
>
> regards, tom lane
--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: ler(at)lerctr(dot)org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749
From | Date | Subject | |
---|---|---|---|
Next Message | Fabio Rollo | 2003-05-14 14:50:40 | SQL Parser |
Previous Message | Tom Lane | 2003-05-13 23:22:20 | Re: Ok, how do I debug THIS? |