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

Commit711804f

Browse files
committed
Prevent #option dump from crashing on FORI statement with null step. Reported by Pavel.
1 parent9cbcfca commit711804f

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

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

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_funcs.c,v 1.88 2010/01/19 01:35:31 tgl Exp $
11+
* $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_funcs.c,v 1.89 2010/02/17 01:48:45 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -543,10 +543,13 @@ dump_fori(PLpgSQL_stmt_fori *stmt)
543543
printf(" upper = ");
544544
dump_expr(stmt->upper);
545545
printf("\n");
546-
dump_ind();
547-
printf(" step = ");
548-
dump_expr(stmt->step);
549-
printf("\n");
546+
if (stmt->step)
547+
{
548+
dump_ind();
549+
printf(" step = ");
550+
dump_expr(stmt->step);
551+
printf("\n");
552+
}
550553
dump_indent-=2;
551554

552555
dump_stmts(stmt->body);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp