Skip to content

Commit

Permalink
Fix for atatvar
Browse files Browse the repository at this point in the history
  • Loading branch information
KushaalShroff committed Dec 13, 2024
1 parent 5874025 commit 4d9c36b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion contrib/babelfishpg_tsql/src/pl_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -5297,7 +5297,7 @@ Datum
pltsql_call_handler(PG_FUNCTION_ARGS)
{
bool nonatomic;
PLtsql_function *func;
PLtsql_function *func = NULL;
PLtsql_execstate *save_cur_estate;
Datum retval;
int rc;
Expand Down Expand Up @@ -5418,6 +5418,11 @@ pltsql_call_handler(PG_FUNCTION_ARGS)
PG_FINALLY();
{
sql_dialect = saved_dialect;

/* If func is NULL then we have encountered a parser error. */
if (!func)
terminate_batch(true /* send_error */ , true /* compile_error */ , current_spi_stack_depth);

}
PG_END_TRY();

Expand Down

0 comments on commit 4d9c36b

Please sign in to comment.