MCPcopy Create free account
hub / github.com/apache/cloudberry / dump_if

Function dump_if

src/pl/plpgsql/src/pl_funcs.c:982–1010  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

980}
981
982static void
983dump_if(PLpgSQL_stmt_if *stmt)
984{
985 ListCell *l;
986
987 dump_ind();
988 printf("IF ");
989 dump_expr(stmt->cond);
990 printf(" THEN\n");
991 dump_stmts(stmt->then_body);
992 foreach(l, stmt->elsif_list)
993 {
994 PLpgSQL_if_elsif *elif = (PLpgSQL_if_elsif *) lfirst(l);
995
996 dump_ind();
997 printf(" ELSIF ");
998 dump_expr(elif->cond);
999 printf(" THEN\n");
1000 dump_stmts(elif->stmts);
1001 }
1002 if (stmt->else_body != NIL)
1003 {
1004 dump_ind();
1005 printf(" ELSE\n");
1006 dump_stmts(stmt->else_body);
1007 }
1008 dump_ind();
1009 printf(" ENDIF\n");
1010}
1011
1012static void
1013dump_case(PLpgSQL_stmt_case *stmt)

Callers 1

dump_stmtFunction · 0.85

Calls 4

dump_indFunction · 0.85
dump_exprFunction · 0.85
dump_stmtsFunction · 0.85
foreachFunction · 0.50

Tested by

no test coverage detected