1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-25 01:02:05 +03:00

Remove redundant grammar symbols

access_method, database_name, and index_name are all just name, and
they are not used consistently for their alleged purpose, so remove
them.  They have been around since ancient times but have no current
reason for existing.  Removing them can simplify future grammar
refactoring.

Discussion: https://www.postgresql.org/message-id/flat/163c00a5-f634-ca52-fc7c-0e53deda8735%402ndquadrant.com
This commit is contained in:
Peter Eisentraut
2020-06-10 22:58:46 +02:00
parent c7eab0e97e
commit c2bd1fec32
2 changed files with 41 additions and 49 deletions

View File

@ -114,7 +114,7 @@ connection_target: opt_database_name opt_server opt_port
}
;
opt_database_name: database_name { $$ = $1; }
opt_database_name: name { $$ = $1; }
| /*EMPTY*/ { $$ = EMPTY; }
;
@ -962,7 +962,7 @@ dis_name: connection_object { $$ = $1; }
| /* EMPTY */ { $$ = mm_strdup("\"CURRENT\""); }
;
connection_object: database_name { $$ = make3_str(mm_strdup("\""), $1, mm_strdup("\"")); }
connection_object: name { $$ = make3_str(mm_strdup("\""), $1, mm_strdup("\"")); }
| DEFAULT { $$ = mm_strdup("\"DEFAULT\""); }
| char_variable { $$ = $1; }
;