postgresql7.1 select 1 from contact_attributes where attribute_id = :attribute_id select widget_id from contact_attributes where attribute_id = :attribute_id select description as widget_description from contact_widgets where widget_id = :widget_id select CASE WHEN storage_column = 'option_map_id' THEN '1' ELSE '0' END as options_p from contact_widgets where widget_id = :widget_id select * from contact_attributes where attribute_id = :attribute_id select * from contact_attribute_names where attribute_id = :attribute_id and locale = :locale select option from contact_attribute_options where attribute_id = :attribute_id select contact__attribute_create ( :attribute_id, :attribute, :widget_id, 'f', now(), :user_id, :peeraddr, :context_id ) select contact__attribute_name_save ( :attribute_id, :language, :name, :help_text ) select contact__attribute_option_create (:attribute_id,:option,:sort_order)