postgresql7.1 begin content_keyword__set_heading(:keyword_id, :heading); content_keyword__set_description(:keyword_id, :description); return null; end; select content_keyword__get_heading(:id) heading, content_keyword__get_description(:id) description, case when content_keyword__is_leaf(:id) = 't' then 'keyword' else 'category' end as what from dual