|
24 | 24 | * Portions Copyright (c) 1994, Regents of the University of California
|
25 | 25 | *
|
26 | 26 | * IDENTIFICATION
|
27 |
| - * $PostgreSQL: pgsql/src/backend/parser/scan.l,v 1.127 2005/06/26 19:16:05 tgl Exp $ |
| 27 | + * $PostgreSQL: pgsql/src/backend/parser/scan.l,v 1.128 2005/08/16 00:48:12 tgl Exp $ |
28 | 28 | *
|
29 | 29 | *-------------------------------------------------------------------------
|
30 | 30 | */
|
@@ -633,6 +633,15 @@ other.
|
633 | 633 | return yytext[0];
|
634 | 634 | }
|
635 | 635 |
|
| 636 | +/* |
| 637 | + * Complain if operator is too long. Unlike the case |
| 638 | + * for identifiers, we make this an error not a notice- |
| 639 | + * and-truncate, because the odds are we are looking at |
| 640 | + * a syntactic mistake anyway. |
| 641 | + */ |
| 642 | +if (nchars >= NAMEDATALEN) |
| 643 | +yyerror("operator too long"); |
| 644 | + |
636 | 645 | /* Convert "!=" operator to "<>" for compatibility */
|
637 | 646 | if (strcmp(yytext,"!=") ==0)
|
638 | 647 | yylval.str =pstrdup("<>");
|
|