Skip to content

Commit

Permalink
more correct check of problematic case
Browse files Browse the repository at this point in the history
  • Loading branch information
okbob committed Sep 16, 2024
1 parent 4662cc6 commit c4c0b94
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pldbgapi2.c
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,8 @@ pldbgapi2_func_setup(PLpgSQL_execstate *estate, PLpgSQL_function *func)
*/
if (!fcache_plpgsql ||
fcache_plpgsql->magic != FMGR_CACHE_MAGIC ||
!fcache_plpgsql->is_plpgsql)
!fcache_plpgsql->is_plpgsql ||
((fcache_plpgsql->funcid != PLpgSQLinlineFunc) && (fcache_plpgsql->funcid != func->fn_oid)))
{
ereport(ERROR,
(errmsg("too late initialization of fmgr_plpgsql_cache"),
Expand Down

0 comments on commit c4c0b94

Please sign in to comment.