Skip to content

Commit 450d7e2

Browse files
committed
Seems pl_funcs didn't have support for plpgsql PERFORM statement.
1 parent e2bfe2d commit 450d7e2

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

src/pl/plpgsql/src/pl_funcs.c

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* procedural language
44
*
55
* IDENTIFICATION
6-
* $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_funcs.c,v 1.25 2003/03/25 03:16:41 tgl Exp $
6+
* $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_funcs.c,v 1.26 2003/05/23 04:08:34 tgl Exp $
77
*
88
* This software is copyrighted by Jan Wieck - Hamburg.
99
*
@@ -472,6 +472,8 @@ plpgsql_stmt_typename(PLpgSQL_stmt * stmt)
472472
return "fetch";
473473
case PLPGSQL_STMT_CLOSE:
474474
return "close";
475+
case PLPGSQL_STMT_PERFORM:
476+
return "perform";
475477
}
476478

477479
return "unknown";
@@ -504,6 +506,7 @@ static void dump_getdiag(PLpgSQL_stmt_getdiag * stmt);
504506
static void dump_open(PLpgSQL_stmt_open * stmt);
505507
static void dump_fetch(PLpgSQL_stmt_fetch * stmt);
506508
static void dump_close(PLpgSQL_stmt_close * stmt);
509+
static void dump_perform(PLpgSQL_stmt_perform * stmt);
507510
static void dump_expr(PLpgSQL_expr * expr);
508511

509512

@@ -579,6 +582,9 @@ dump_stmt(PLpgSQL_stmt * stmt)
579582
case PLPGSQL_STMT_CLOSE:
580583
dump_close((PLpgSQL_stmt_close *) stmt);
581584
break;
585+
case PLPGSQL_STMT_PERFORM:
586+
dump_perform((PLpgSQL_stmt_perform *) stmt);
587+
break;
582588
default:
583589
elog(ERROR, "plpgsql_dump: unknown cmd_type %d\n", stmt->cmd_type);
584590
break;
@@ -808,6 +814,15 @@ dump_close(PLpgSQL_stmt_close * stmt)
808814
printf("CLOSE curvar=%d\n", stmt->curvar);
809815
}
810816

817+
static void
818+
dump_perform(PLpgSQL_stmt_perform * stmt)
819+
{
820+
dump_ind();
821+
printf("PERFORM expr = ");
822+
dump_expr(stmt->expr);
823+
printf("\n");
824+
}
825+
811826
static void
812827
dump_exit(PLpgSQL_stmt_exit * stmt)
813828
{

0 commit comments

Comments
 (0)