Chris Browne cbbrowne at lists.slony.info
Tue Oct 23 09:52:58 PDT 2007
Update of /home/cvsd/slony1/slony1-engine/src/backend
In directory main.slony.info:/tmp/cvs-serv11947

Modified Files:
	slony1_funcs.sql 
Log Message:
Impose "order by tab_id" in several places where tables are being
altered to turn replication on/off.

Seems preferable to order this way; that way we're actually using
the table ordering that the docs claim we use.


Index: slony1_funcs.sql
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/backend/slony1_funcs.sql,v
retrieving revision 1.121
retrieving revision 1.122
diff -C2 -d -r1.121 -r1.122
*** slony1_funcs.sql	13 Sep 2007 14:19:58 -0000	1.121
--- slony1_funcs.sql	23 Oct 2007 16:52:56 -0000	1.122
***************
*** 1201,1204 ****
--- 1201,1205 ----
  				for v_row2 in select * from @NAMESPACE at .sl_table
  						where tab_set = v_row.set_id
+ 						order by tab_id
  				loop
  					perform @NAMESPACE at .alterTableConfigureTriggers(v_row2.tab_id);
***************
*** 1359,1362 ****
--- 1360,1364 ----
  		for v_row in select * from @NAMESPACE at .sl_table
  				where tab_set = p_set_id
+ 				order by tab_id
  		loop
  			perform @NAMESPACE at .alterTableConfigureTriggers(v_row.tab_id);
***************
*** 5282,5286 ****
  		-- Upgrading from a pre-2.0 ... repair the system catalog
  		-- ----
! 		for v_tab_row in select * from @NAMESPACE at .sl_table loop
  			perform @NAMESPACE at .alterTableRestore(v_tab_row.tab_id);
  		end loop;
--- 5284,5288 ----
  		-- Upgrading from a pre-2.0 ... repair the system catalog
  		-- ----
! 		for v_tab_row in select * from @NAMESPACE at .sl_table order by tab_id loop
  			perform @NAMESPACE at .alterTableRestore(v_tab_row.tab_id);
  		end loop;
***************
*** 5295,5299 ****
  		-- and create the new versions of the log and deny access triggers.
  		-- ----
! 		for v_tab_row in select * from @NAMESPACE at .sl_table loop
  			perform @NAMESPACE at .alterTableAddTriggers(v_tab_row.tab_id);
  			perform @NAMESPACE at .alterTableConfigureTriggers(v_tab_row.tab_id);
--- 5297,5301 ----
  		-- and create the new versions of the log and deny access triggers.
  		-- ----
! 		for v_tab_row in select * from @NAMESPACE at .sl_table order by tab_id loop
  			perform @NAMESPACE at .alterTableAddTriggers(v_tab_row.tab_id);
  			perform @NAMESPACE at .alterTableConfigureTriggers(v_tab_row.tab_id);



More information about the Slony1-commit mailing list