Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 193a7d7

Browse files
committed
Remove dead code in bootstrap
The bootstrap scanner/parser contains code to parse floating point values, but this is not exercised anywhere, so remove it. Reviewed-by: Jim Nasby Discussion: https://postgr.es/m/20170110051119.b5h7i3z5qagy35rb@alvherre.pgsql
1 parent 593c75d commit 193a7d7

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

src/backend/bootstrap/bootparse.y

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,11 @@ static int num_columns_read = 0;
105105

106106
%type <list> boot_index_params
107107
%type <ielem> boot_index_param
108-
%type <str> boot_const boot_ident
108+
%type <str> boot_ident
109109
%type <ival> optbootstrap optsharedrelation optwithoutoids boot_column_nullness
110110
%type <oidval> oidspec optoideq optrowtypeoid
111111

112-
%token <str> CONST_P ID
112+
%token <str> ID
113113
%token OPEN XCLOSE XCREATE INSERT_TUPLE
114114
%token XDECLARE INDEX ON USING XBUILD INDICES UNIQUE XTOAST
115115
%token COMMA EQUALS LPAREN RPAREN
@@ -464,16 +464,10 @@ boot_column_val_list:
464464
boot_column_val:
465465
boot_ident
466466
{ InsertOneValue($1, num_columns_read++); }
467-
| boot_const
468-
{ InsertOneValue($1, num_columns_read++); }
469467
| NULLVAL
470468
{ InsertOneNull(num_columns_read++); }
471469
;
472470

473-
boot_const :
474-
CONST_P { $$ = yylval.str; }
475-
;
476-
477471
boot_ident :
478472
ID { $$ = yylval.str; }
479473
;

src/backend/bootstrap/bootscanner.l

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ static int yyline = 1; /* line number for error reporting */
6666

6767
D [0-9]
6868
oct \\{D}{D}{D}
69-
Exp [Ee][-+]?{D}+
7069
id ([A-Za-z0-9_]|{oct}|\-)+
7170
sid \"([^\"])*\"
7271
arrayid [A-Za-z0-9_]+\[{D}*\]
@@ -127,13 +126,6 @@ insert { return(INSERT_TUPLE); }
127126
return(ID);
128127
}
129128

130-
(-)?{D}+"."{D}*({Exp})? |
131-
(-)?{D}*"."{D}+({Exp})? |
132-
(-)?{D}+{Exp} {
133-
yylval.str = pstrdup(yytext);
134-
return(CONST_P);
135-
}
136-
137129
. {
138130
elog(ERROR, "syntax error at line %d: unexpected character \"%s\"", yyline, yytext);
139131
}

0 commit comments

Comments
 (0)