Skip site navigation (1) Skip section navigation (2)

Re: tip: weird parse error for pl/pgsql

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Keith Wong <keith(at)e-magine(dot)com(dot)au>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: tip: weird parse error for pl/pgsql
Date: 2000-08-22 15:03:53
Message-ID: 6812.966956633@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-sql
Keith Wong <keith(at)e-magine(dot)com(dot)au> 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

In response to

pgsql-sql by date

Next:From: Graham VickrageDate: 2000-08-22 15:37:09
Subject: Null function parameters
Previous:From: Mark VolpeDate: 2000-08-22 15:03:06
Subject: Re: Time Help

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group