-- -- xowiki_form_f/1 -- create or replace function xowiki_form_f( p_new xowiki_formi ) returns void as $$ declare v_revision_id integer; begin select content_revision__new( p_new.title, p_new.description, p_new.publish_date, p_new.mime_type, p_new.nls_language, case when p_new.text is null then p_new.data else p_new.text end, content_symlink__resolve(p_new.item_id), p_new.revision_id, now(), p_new.creation_user, p_new.creation_ip, null, -- content_length p_new.object_package_id ) into v_revision_id; insert into xowiki_page ( page_id, page_title, creator, page_order ) values (v_revision_id, p_new.page_title, p_new.creator, p_new.page_order); insert into xowiki_page_template ( page_template_id, anon_instances ) values (v_revision_id, p_new.anon_instances); insert into xowiki_form ( xowiki_form_id, form, form_constraints ) values (v_revision_id, p_new.form, p_new.form_constraints); return; end;$$ language plpgsql;