-- -- workflow__simple_p/1 -- create or replace function workflow__simple_p( character varying ) returns bool as $$ declare simple_p__workflow_key alias for $1; v_session_id integer; retval boolean; begin v_session_id := nextval('workflow_session_id'); retval := __workflow__simple_p(simple_p__workflow_key, v_session_id); delete from previous_place_list where session_id = v_session_id; delete from target_place_list where session_id = v_session_id; delete from guard_list where session_id = v_session_id; return retval; end;$$ language plpgsql;