is_node_reachable(receiver_node_id integer, origin_node_id integer)

8.71. is_node_reachable(receiver_node_id integer, origin_node_id integer)

Function Properties

Language: PLPGSQL

Return Type: boolean

Is the receiver node reachable from the origin, via any of the listen paths?

declare
		listen_row record;
		reachable boolean;
begin
	reachable:=false;
	select * into listen_row from sl_listen where
		   li_origin=origin_node_id and li_receiver=receiver_node_id;
	if found then
	   reachable:=true;
	end if;
  return reachable;
end