--
-- pa_collection__title/1
--
create or replace function pa_collection__title(
integer
) returns varchar as $$
declare
p_collection_id alias for $1;
v_title varchar;
begin
select title into v_title
from pa_collections
where collection_id = p_collection_id;
return v_title;
end;
$$ language plpgsql;