-- plphp.on_init failure: the first call of the session fails cleanly; after -- clearing the GUC things work (this file must be its own test so it gets a -- fresh session). CREATE FUNCTION oninit_victim() RETURNS int LANGUAGE plphp AS $$ return 41 + 1; $$; SET plphp.on_init = 'throw new Exception("on_init boom");'; SELECT oninit_victim(); ERROR: plphp: on_init failed: on_init boom CONTEXT: PL/php function "oninit_victim" RESET plphp.on_init; SELECT oninit_victim(); oninit_victim --------------- 42 (1 row) DROP FUNCTION oninit_victim();