-- -- user_profile__new/7 -- create or replace function user_profile__new( integer, character varying, integer, integer, character varying, integer, character varying ) returns int4 as $$ declare new__profile_id alias for $1; -- default null, new__rel_type alias for $2; -- default 'user_profile', new__object_id_one alias for $3; new__object_id_two alias for $4; new__member_state alias for $5; -- default null, new__creation_user alias for $6; -- default null, new__creation_ip alias for $7; -- default null v_profile_id integer; begin v_profile_id := membership_rel__new ( new__profile_id, new__rel_type, new__object_id_one, new__object_id_two, new__member_state, new__creation_user, new__creation_ip ); insert into user_profiles (profile_id) values (v_profile_id); return v_profile_id; end;$$ language plpgsql;