Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2]) by hub.org (8.10.1/8.10.1) with ESMTP id e7MF44T92060 for ; Tue, 22 Aug 2000 11:04:04 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id LAA06815; Tue, 22 Aug 2000 11:03:54 -0400 (EDT) To: Keith Wong cc: pgsql-sql@postgresql.org Subject: Re: tip: weird parse error for pl/pgsql In-reply-to: <4.3.2.7.0.20000822205039.00b11e90@mail.e-magine.com.au> References: <4.3.2.7.0.20000822205039.00b11e90@mail.e-magine.com.au> Comments: In-reply-to Keith Wong message dated "Tue, 22 Aug 2000 21:16:23 +1000" Date: Tue, 22 Aug 2000 11:03:53 -0400 Message-ID: <6812.966956633@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200008/227 Keith Wong writes: > It seems that pl/pgsql has a problem parsing Window style > new line characters. Ah-hah, good catch! I have fixed this bug for 7.1. If you want to patch your local copy, the critical changes are: *** src/pl/plpgsql/src/scan.l.orig Thu Jun 22 19:08:34 2000 --- src/pl/plpgsql/src/scan.l Tue Aug 22 10:59:28 2000 *************** *** 143,155 **** * Ignore whitespaces but remember this happened * ---------- */ ! [ \t\n]+ { plpgsql_SpaceScanned = 1; } /* ---------- * Eat up comments * ---------- */ ! --[^\n]* ; \/\* { start_lineno = yylineno; BEGIN IN_COMMENT; } --- 146,158 ---- * Ignore whitespaces but remember this happened * ---------- */ ! [ \t\r\n]+ { plpgsql_SpaceScanned = 1; } /* ---------- * Eat up comments * ---------- */ ! --[^\r\n]* ; \/\* { start_lineno = yylineno; BEGIN IN_COMMENT; } regards, tom lane