From: Tom Lane Date: Sun, 12 Mar 2000 20:09:41 +0000 (+0000) Subject: Somehow, the variant NATIONAL CHAR [ VARYING ] was missing from the X-Git-Tag: REL7_0~452 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7cb253ed1927eabe9d5d30440536995790238784;p=postgresql Somehow, the variant NATIONAL CHAR [ VARYING ] was missing from the set of SQL-standard type names that we accept. --- diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index fede1f901e..ab69eb4794 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -11,7 +11,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.154 2000/03/12 00:39:52 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.155 2000/03/12 20:09:41 tgl Exp $ * * HISTORY * AUTHOR DATE MAJOR EVENT @@ -3947,10 +3947,11 @@ character: CHARACTER opt_varying opt_charset }; $$ = type; } - | CHAR opt_varying { $$ = xlateSqlType($2? "varchar": "bpchar"); } + | CHAR opt_varying { $$ = xlateSqlType($2 ? "varchar": "bpchar"); } | VARCHAR { $$ = xlateSqlType("varchar"); } - | NATIONAL CHARACTER opt_varying { $$ = xlateSqlType($3? "varchar": "bpchar"); } - | NCHAR opt_varying { $$ = xlateSqlType($2? "varchar": "bpchar"); } + | NATIONAL CHARACTER opt_varying { $$ = xlateSqlType($3 ? "varchar": "bpchar"); } + | NATIONAL CHAR opt_varying { $$ = xlateSqlType($3 ? "varchar": "bpchar"); } + | NCHAR opt_varying { $$ = xlateSqlType($2 ? "varchar": "bpchar"); } ; opt_varying: VARYING { $$ = TRUE; }