drop function if exists glb; create function glb(val text) returns text language sql as $$ select current_setting('glb.' || val)::text; $$;
SET glb.myVar = 'val';
SHOW glb.myVar; SELECT glb('myVar');