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

Commit44e135a

Browse files
committed
Avoid throwing away the error message in syncrep_yyerror.
Commit473a575 purported to make thisfunction stash the error message in *syncrep_parse_result_p, butit didn't actually.As a result, an attempt to set synchronous_standby_names to any valuethat does not parse resulted in a generic "parser failed." messagerather than anything more specific. This fixes that.Discussion:http://postgr.es/m/CA+TgmoYF9wPNZ-Q_EMfib_espgHycY-eX__6Tzo2GpYpVXqCdQ@mail.gmail.comBackpatch-through: 18
1 parent13eb6bb commit44e135a

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

‎src/backend/replication/syncrep_scanner.l‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -157,17 +157,16 @@ syncrep_yyerror(SyncRepConfigData **syncrep_parse_result_p, char **syncrep_parse
157157
{
158158
structyyguts_t *yyg = (structyyguts_t *) yyscanner;/* needed for yytext
159159
* macro */
160-
char *syncrep_parse_error_msg = *syncrep_parse_error_msg_p;
161160

162161
/* report only the first error in a parse operation */
163-
if (syncrep_parse_error_msg)
162+
if (*syncrep_parse_error_msg_p)
164163
return;
165164
if (yytext[0])
166-
syncrep_parse_error_msg =psprintf("%s at or near\"%s\"",
167-
message, yytext);
165+
*syncrep_parse_error_msg_p =psprintf("%s at or near\"%s\"",
166+
message, yytext);
168167
else
169-
syncrep_parse_error_msg =psprintf("%s at end of input",
170-
message);
168+
*syncrep_parse_error_msg_p =psprintf("%s at end of input",
169+
message);
171170
}
172171

173172
void

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp