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

Commite41718f

Browse files
committed
Fix a few bogus statement type names in plpgsql error messages.
plpgsql's error location context messages ("PL/pgSQL function fn-name lineline-no at stmt-type") would misreport a CONTINUE statement as being anEXIT, and misreport a MOVE statement as being a FETCH. These are clearbugs that have been there a long time, so back-patch to all supportedbranches.In addition, in 9.5 and HEAD, change the description of EXECUTE from"EXECUTE statement" to just plain EXECUTE; there seems no good reason whythis statement type should be described differently from others that havea well-defined head keyword. And distinguish GET STACKED DIAGNOSTICS fromplain GET DIAGNOSTICS. These are a bit more of a judgment call, and alsoaffect existing regression-test outputs, so I did not back-patch intostable branches.Pavel Stehule and Tom Lane
1 parentec2bc39 commite41718f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/pl/plpgsql/src/pl_funcs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ plpgsql_stmt_typename(PLpgSQL_stmt *stmt)
231231
casePLPGSQL_STMT_FORC:
232232
return_("FOR over cursor");
233233
casePLPGSQL_STMT_EXIT:
234-
return"EXIT";
234+
return((PLpgSQL_stmt_exit*)stmt)->is_exit ?"EXIT" :"CONTINUE";
235235
casePLPGSQL_STMT_RETURN:
236236
return"RETURN";
237237
casePLPGSQL_STMT_RETURN_NEXT:
@@ -251,7 +251,7 @@ plpgsql_stmt_typename(PLpgSQL_stmt *stmt)
251251
casePLPGSQL_STMT_OPEN:
252252
return"OPEN";
253253
casePLPGSQL_STMT_FETCH:
254-
return"FETCH";
254+
return((PLpgSQL_stmt_fetch*)stmt)->is_move ?"MOVE" :"FETCH";
255255
casePLPGSQL_STMT_CLOSE:
256256
return"CLOSE";
257257
casePLPGSQL_STMT_PERFORM:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp