Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Dipesh Dhameliya committed Oct 18, 2023
1 parent 9225395 commit c5ddb5d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion contrib/babelfishpg_tsql/src/procedures.c
Original file line number Diff line number Diff line change
Expand Up @@ -508,11 +508,14 @@ sp_describe_first_result_set_internal(PG_FUNCTION_ARGS)
}
PG_CATCH();
{
HOLD_INTERRUPTS();
query = psprintf("DROP VIEW %s", sp_describe_first_result_set_view_name);
HOLD_INTERRUPTS();

if ((rc = SPI_execute(query, false, 1)) < 0)
{
RESUME_INTERRUPTS();
elog(ERROR, "SPI_execute failed: %s", SPI_result_code_string(rc));
}

pfree(query);
pfree(sp_describe_first_result_set_view_name);
Expand Down

0 comments on commit c5ddb5d

Please sign in to comment.