If you want to use results of SHOW command in plpgsql, than you can.
DECLARE
l_search_path TEXT;
BEGIN
SHOW search_path INTO l_search_path;
RAISE NOTICE 'SHOW search_path=%', l_search_path;
You can also store results of eg. EXPLAIN in similar fashion.