Skip to content

Commit c4c0b94

Browse files
committed
more correct check of problematic case
1 parent 4662cc6 commit c4c0b94

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/pldbgapi2.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,8 @@ pldbgapi2_func_setup(PLpgSQL_execstate *estate, PLpgSQL_function *func)
836836
*/
837837
if (!fcache_plpgsql ||
838838
fcache_plpgsql->magic != FMGR_CACHE_MAGIC ||
839-
!fcache_plpgsql->is_plpgsql)
839+
!fcache_plpgsql->is_plpgsql ||
840+
((fcache_plpgsql->funcid != PLpgSQLinlineFunc) && (fcache_plpgsql->funcid != func->fn_oid)))
840841
{
841842
ereport(ERROR,
842843
(errmsg("too late initialization of fmgr_plpgsql_cache"),

0 commit comments

Comments
 (0)