Commit 64ebb583 authored by Thomas G. Lockhart's avatar Thomas G. Lockhart

Allow LIKE expression in constraint clause.

Allow USER and VALID as column names and identifiers.
parent 5ac4dcaa
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.3 1998/02/18 03:26:54 vadim Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.4 1998/02/18 07:25:57 thomas Exp $
* *
* HISTORY * HISTORY
* AUTHOR DATE MAJOR EVENT * AUTHOR DATE MAJOR EVENT
...@@ -994,6 +994,8 @@ constraint_expr: AexprConst ...@@ -994,6 +994,8 @@ constraint_expr: AexprConst
} }
| constraint_expr Op constraint_expr | constraint_expr Op constraint_expr
{ $$ = nconc( $1, lcons( makeString( $2), $3)); } { $$ = nconc( $1, lcons( makeString( $2), $3)); }
| constraint_expr LIKE constraint_expr
{ $$ = nconc( $1, lcons( makeString( "like"), $3)); }
| constraint_expr AND constraint_expr | constraint_expr AND constraint_expr
{ $$ = nconc( $1, lcons( makeString( "AND"), $3)); } { $$ = nconc( $1, lcons( makeString( "AND"), $3)); }
| constraint_expr OR constraint_expr | constraint_expr OR constraint_expr
...@@ -4620,6 +4622,8 @@ ColId: IDENT { $$ = $1; } ...@@ -4620,6 +4622,8 @@ ColId: IDENT { $$ = $1; }
| TIME { $$ = "time"; } | TIME { $$ = "time"; }
| TRIGGER { $$ = "trigger"; } | TRIGGER { $$ = "trigger"; }
| TYPE_P { $$ = "type"; } | TYPE_P { $$ = "type"; }
| USER { $$ = "user"; }
| VALID { $$ = "valid"; }
| VERSION { $$ = "version"; } | VERSION { $$ = "version"; }
| ZONE { $$ = "zone"; } | ZONE { $$ = "zone"; }
; ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment