-- -- bt_patch__name/1 -- create or replace function bt_patch__name( integer ) returns varchar as $$ declare p_patch_id alias for $1; v_name varchar; begin select 'Patch #'||patch_number||': '||summary into v_name from bt_patches where patch_id = p_patch_id; return v_name; end; $$ language plpgsql;