X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 47A0E4763D0 for ; Tue, 13 May 2003 20:24:15 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 33D8C4763C9 for ; Tue, 13 May 2003 20:24:14 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h4DNMKU6019271; Tue, 13 May 2003 19:22:21 -0400 (EDT) To: josh@agliodbs.com Cc: Larry Rosenman , pgsql-sql@postgresql.org Subject: Re: Ok, how do I debug THIS? In-reply-to: <200305131245.26203.josh@agliodbs.com> References: <246160000.1052853868@lerlaptop.iadfw.net> <200305131231.34175.josh@agliodbs.com> <256400000.1052854454@lerlaptop.iadfw.net> <200305131245.26203.josh@agliodbs.com> Comments: In-reply-to Josh Berkus message dated "Tue, 13 May 2003 12:45:26 -0700" Date: Tue, 13 May 2003 19:22:20 -0400 Message-ID: <19270.1052868140@sss.pgh.pa.us> From: Tom Lane X-Spam-Status: No, hits=-32.5 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REFERENCES,REPLY_WITH_QUOTES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200305/253 X-Sequence-Number: 13418 Josh Berkus 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