Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit193a7d7

Browse files
committed
Remove dead code in bootstrap
The bootstrap scanner/parser contains code to parse floating pointvalues, but this is not exercised anywhere, so remove it.Reviewed-by: Jim NasbyDiscussion:https://postgr.es/m/20170110051119.b5h7i3z5qagy35rb@alvherre.pgsql
1 parent593c75d commit193a7d7

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_constboot_ident
108+
%type<str>boot_ident
109109
%type<ival>optbootstrapoptsharedrelationoptwithoutoidsboot_column_nullness
110110
%type<oidval>oidspecoptoideqoptrowtypeoid
111111

112-
%token<str>CONST_PID
112+
%token<str>ID
113113
%tokenOPENXCLOSEXCREATEINSERT_TUPLE
114114
%tokenXDECLAREINDEXONUSINGXBUILDINDICESUNIQUEXTOAST
115115
%tokenCOMMAEQUALSLPARENRPAREN
@@ -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 intyyline = 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)

[8]ページ先頭

©2009-2025 Movatter.jp