支持不等于操作符:^=

This commit is contained in:
siven
2021-02-08 14:30:06 +08:00
parent 6b90131ab8
commit 6d53432caf
3 changed files with 10 additions and 1 deletions

View File

@ -913,7 +913,7 @@ other .
yyerror("operator too long");
/* Convert "!=" operator to "<>" for compatibility */
if (strcmp(yytext, "!=") == 0)
if (strcmp(yytext, "!=") == 0 || strcmp(yytext, "^=") == 0)
{
yylval->str = pstrdup("<>");
yyextra->is_hint_str = false;

View File

@ -904,3 +904,9 @@ LINE 1: select xmin from t, ft1 where t.a=ft1.a;
^
drop schema syscolofforeign cascade;
NOTICE: drop cascades to table t
-- test ^=
select 1 ^= 2;
?column?
----------
t
(1 row)

View File

@ -270,3 +270,6 @@ select t.xmin from t, ft1 where t.a=ft1.a;
select xmin from t, ft1 where t.a=ft1.a;
drop schema syscolofforeign cascade;
-- test ^=
select 1 ^= 2;