Steve Singer ssinger at ca.afilias.info
Mon Jul 19 08:51:48 PDT 2010
Print a better error message when using a receiver node id that does not exist
---
 src/backend/slony1_funcs.sql |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/backend/slony1_funcs.sql b/src/backend/slony1_funcs.sql
index 625c50c..3e33c97 100644
--- a/src/backend/slony1_funcs.sql
+++ b/src/backend/slony1_funcs.sql
@@ -4131,6 +4131,14 @@ begin
 		raise exception 'Slony-I: subscribeSet() must be called on provider';
 	end if;
 
+	--
+	-- Check that the receiver exists
+	--
+	if not exists (select no_id from @NAMESPACE at .sl_node where no_id=
+	       	      p_sub_receiver) then
+		      raise exception 'Slony-I: subscribeSet() the receiver does not exist';
+	end if;
+
 	-- ----
 	-- Check that the origin and provider of the set are remote
 	-- ----
-- 
1.6.3.3


--------------090809050801030305010704--


More information about the Slony1-patches mailing list