*** scan.l~	2002-11-10 21:33:44.000000000 -0600
--- scan.l	2004-03-30 15:36:23.000000000 -0600
***************
*** 408,414 ****
  						literalbuf[len] = '\0';
  						literallen = len;
  					}
! 					yylval.str = litbufdup();
  					return IDENT;
  				}
  <xd>{xddouble} {
--- 408,414 ----
  						literalbuf[len] = '\0';
  						literallen = len;
  					}
! 					yylval.str = litbufdup_lower();
  					return IDENT;
  				}
  <xd>{xddouble} {
***************
*** 670,675 ****
--- 670,691 ----
  	return new;
  }
  
+ static char *
+ litbufdup_lower(void)
+ {
+ 	char *new;
+         int i;
+ 
+ 	new = palloc(literallen + 1);
+ 	memcpy(new, literalbuf, literallen+1);
+ 
+         for(i = 0; x < literallen; x++)
+           if (isupper((unsigned char) *(new + i))
+ 		*(new + i) = tolower((unsigned char) *(new + i));
+ 
+ 	return new;
+ }
+ 
  
  unsigned char
  unescape_single_char(unsigned char c)
