CREATE OR REPLACE FUNCTION core.get_account_name(bigint) RETURNS text LANGUAGE plpgsql STABLE AS $function$ BEGIN RETURN account_name FROM core.accounts WHERE account_id=$1; END $function$