CVS User Account cvsuser
Fri Oct 8 17:30:47 PDT 2004
Log Message:
-----------
Added SET MOVE TABLE and SET MOVE SEQUENCE commands to change
the set a table or sequence belongs to without unsubscribing and
resubscribing all nodes.

Jan

Tags:
----
REL_1_0_STABLE

Modified Files:
--------------
    slony1-engine/doc/howto:
        slonik_commands.html (r1.1.2.1 -> r1.1.2.2)
    slony1-engine/src/backend:
        slony1_funcs.sql (r1.15.2.5 -> r1.15.2.6)
    slony1-engine/src/slon:
        local_listen.c (r1.23.2.2 -> r1.23.2.3)
        remote_worker.c (r1.55.2.6 -> r1.55.2.7)
    slony1-engine/src/slonik:
        parser.c (r1.16.2.2 -> r1.16.2.3)
        parser.y (r1.16.2.2 -> r1.16.2.3)
        scan.c (r1.17.2.2 -> r1.17.2.3)
        slonik.c (r1.27.2.3 -> r1.27.2.4)
        slonik.h (r1.17.2.1 -> r1.17.2.2)

-------------- next part --------------
Index: remote_worker.c
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/src/slon/remote_worker.c,v
retrieving revision 1.55.2.6
retrieving revision 1.55.2.7
diff -Lsrc/slon/remote_worker.c -Lsrc/slon/remote_worker.c -u -w -r1.55.2.6 -r1.55.2.7
--- src/slon/remote_worker.c
+++ src/slon/remote_worker.c
@@ -689,19 +689,41 @@
 				 * sequences information is not maintained in
 				 * the runtime configuration.
 				 */
- 			} else if (strcmp(event->ev_type, "SET_DROP_TABLE") == 0) 
+ 			}
+			else if (strcmp(event->ev_type, "SET_DROP_TABLE") == 0) 
  			{
  			  int tab_id = (int) strtol(event->ev_data1, NULL, 10);
+
  			  slon_appendquery(&query1, "select %s.setDropTable_int(%d);", 
  					   rtcfg_namespace,
  					   tab_id);
- 			} else if (strcmp(event->ev_type, "SET_DROP_SEQUENCE") == 0)
+ 			}
+			else if (strcmp(event->ev_type, "SET_DROP_SEQUENCE") == 0)
  			{
  			  int seq_id = (int) strtol(event->ev_data1, NULL, 10);
+
  			  slon_appendquery(&query1, "select %s.setDropSequence_int(%d);", 
  					   rtcfg_namespace,
  					   seq_id);
 			}
+			else if (strcmp(event->ev_type, "SET_MOVE_TABLE") == 0) 
+ 			{
+				int tab_id = (int) strtol(event->ev_data1, NULL, 10);
+				int new_set_id = (int) strtol(event->ev_data2, NULL, 10);
+
+				slon_appendquery(&query1, "select %s.setMoveTable_int(%d, %d);", 
+						rtcfg_namespace,
+						tab_id, new_set_id);
+ 			}
+			else if (strcmp(event->ev_type, "SET_MOVE_SEQUENCE") == 0)
+ 			{
+ 				int seq_id = (int) strtol(event->ev_data1, NULL, 10);
+ 				int new_set_id = (int) strtol(event->ev_data2, NULL, 10);
+
+				slon_appendquery(&query1, "select %s.setMoveSequence_int(%d, %d);", 
+						rtcfg_namespace,
+						seq_id, new_set_id);
+			}
 			else if (strcmp(event->ev_type, "STORE_TRIGGER") == 0)
 			{
 				int		trig_tabid = (int) strtol(event->ev_data1, NULL, 10);
Index: local_listen.c
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/src/slon/local_listen.c,v
retrieving revision 1.23.2.2
retrieving revision 1.23.2.3
diff -Lsrc/slon/local_listen.c -Lsrc/slon/local_listen.c -u -w -r1.23.2.2 -r1.23.2.3
--- src/slon/local_listen.c
+++ src/slon/local_listen.c
@@ -424,6 +424,28 @@
 				 * the runtime configuration.
 				 */
 			}
+			else if (strcmp(ev_type, "SET_MOVE_TABLE") == 0)
+			{
+				/*
+				 * SET_MOVE_TABLE
+				 */
+				/*
+				 * Nothing to do ATM ... 
+				 * table information is not maintained in
+				 * the runtime configuration.
+				 */
+			}
+			else if (strcmp(ev_type, "SET_MOVE_SEQUENCE") == 0)
+			{
+				/*
+				 * SET_MOVE_SEQUENCE
+				 */
+				/*
+				 * Nothing to do ATM ... 
+				 * table information is not maintained in
+				 * the runtime configuration.
+				 */
+			}
 			else if (strcmp(ev_type, "ADJUST_SEQ") == 0)
 			{
 				/*
Index: slonik_commands.html
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/doc/howto/slonik_commands.html,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -Ldoc/howto/slonik_commands.html -Ldoc/howto/slonik_commands.html -u -w -r1.1.2.1 -r1.1.2.2
--- doc/howto/slonik_commands.html
+++ doc/howto/slonik_commands.html
@@ -39,6 +39,8 @@
 		<li><a href="#stmt_set_add_sequence">SET ADD SEQUENCE</a>
 		<li><a href="#stmt_set_drop_table">SET DROP TABLE</a>
 		<li><a href="#stmt_set_drop_sequence">SET DROP SEQUENCE</a>
+		<li><a href="#stmt_set_move_table">SET DROP TABLE</a>
+		<li><a href="#stmt_set_move_sequence">SET DROP SEQUENCE</a>
 		<li><a href="#stmt_store_trigger">STORE TRIGGER</a>
 		<li><a href="#stmt_drop_trigger">DROP TRIGGER</a>
 		<li><a href="#stmt_subscribe_set">SUBSCRIBE SET</a>
@@ -1097,6 +1099,106 @@
 <p align="right">Back to <a href="#index">Index</a></p>
 
 <!-- **************************************** -->
+<a name="stmt_set_move_table">
+<h3>SET MOVE TABLE</h3>
+</a>
+<div style="margin-left:40px; margin-right:0px;">
+<h3>Synopsis:</h3>
+	SET MOVE TABLE ( &lt;options&gt; );
+<h3>Description:</h3>
+<p>
+	Change the set a table belongs to. The current set and the new set
+	must origin on the same node and subscribed by the same nodes.
+	CAUTION: Due to the way subscribing to new sets works make
+	absolutely sure that the subscription of all nodes to the sets
+	is completely processed before moving tables. Moving a table too
+	early to a new set causes the subscriber to try and add the table
+	already during the subscription process, which fails with a duplicate
+	key error and breaks replication.
+</p>
+<table border="0" cellpadding="10">
+<tr>
+	<td align="left" valign="top" nowrap><b>ORIGIN = &lt;ival&gt;</b></td>
+	<td align="left" valign="top"><p>
+		The current origin of the set. A future version of slonik
+		might figure out this information by itself.
+	</p></td>
+</tr>
+<tr>
+	<td align="left" valign="top" nowrap><b>ID = &lt;ival&gt;</b></td>
+	<td align="left" valign="top"><p>
+		Unique ID of the table. 
+	</p></td>
+</tr>
+<tr>
+	<td align="left" valign="top" nowrap><b>NEW SET = &lt;ival&gt;</b></td>
+	<td align="left" valign="top"><p>
+		Unique ID of the new set. 
+	</p></td>
+</tr>
+</table>
+<h3>Example:</h3>
+<p>
+	SET MOVE TABLE (
+	<br>&nbsp;&nbsp;&nbsp;&nbsp;ORIGIN = 1,
+	<br>&nbsp;&nbsp;&nbsp;&nbsp;ID = 20,
+	<br>&nbsp;&nbsp;&nbsp;&nbsp;NEW SET = 3
+	<br>);
+</p>
+</div>
+<p align="right">Back to <a href="#index">Index</a></p>
+
+<!-- **************************************** -->
+<a name="stmt_set_move_sequence">
+<h3>SET MOVE SEQUENCE</h3>
+</a>
+<div style="margin-left:40px; margin-right:0px;">
+<h3>Synopsis:</h3>
+	SET MOVE SEQUENCE ( &lt;options&gt; );
+<h3>Description:</h3>
+<p>
+	Change the set a sequence belongs to. The current set and the new set
+	must origin on the same node and subscribed by the same nodes.
+	CAUTION: Due to the way subscribing to new sets works make
+	absolutely sure that the subscription of all nodes to the sets
+	is completely processed before moving sequences. Moving a sequence too
+	early to a new set causes the subscriber to try and add the sequence
+	already during the subscription process, which fails with a duplicate
+	key error and breaks replication.
+</p>
+<table border="0" cellpadding="10">
+<tr>
+	<td align="left" valign="top" nowrap><b>ORIGIN = &lt;ival&gt;</b></td>
+	<td align="left" valign="top"><p>
+		The current origin of the set. A future version of slonik
+		might figure out this information by itself.
+	</p></td>
+</tr>
+<tr>
+	<td align="left" valign="top" nowrap><b>ID = &lt;ival&gt;</b></td>
+	<td align="left" valign="top"><p>
+		Unique ID of the sequence. 
+	</p></td>
+</tr>
+<tr>
+	<td align="left" valign="top" nowrap><b>NEW SET = &lt;ival&gt;</b></td>
+	<td align="left" valign="top"><p>
+		Unique ID of the new set. 
+	</p></td>
+</tr>
+</table>
+<h3>Example:</h3>
+<p>
+	SET MOVE SEQUENCE (
+	<br>&nbsp;&nbsp;&nbsp;&nbsp;ORIGIN = 1,
+	<br>&nbsp;&nbsp;&nbsp;&nbsp;ID = 54,
+	<br>&nbsp;&nbsp;&nbsp;&nbsp;NEW SET = 3
+	<br>);
+</p>
+</div>
+<p align="right">Back to <a href="#index">Index</a></p>
+
+<!-- **************************************** -->
 <a name="stmt_store_trigger">
 <h3>STORE TRIGGER</h3>
 </a>
Index: slony1_funcs.sql
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/src/backend/slony1_funcs.sql,v
retrieving revision 1.15.2.5
retrieving revision 1.15.2.6
diff -Lsrc/backend/slony1_funcs.sql -Lsrc/backend/slony1_funcs.sql -u -w -r1.15.2.5 -r1.15.2.6
--- src/backend/slony1_funcs.sql
+++ src/backend/slony1_funcs.sql
@@ -2514,6 +2514,240 @@
 subscribe to the set containing sequence seq_id, drop the sequence
 from the replication set.';
 
+
+-- ----------------------------------------------------------------------
+-- FUNCTION setMoveTable (tab_id, new_set_id)
+--
+--	Generate the SET_MOVE_TABLE event.
+-- ----------------------------------------------------------------------
+create or replace function @NAMESPACE at .setMoveTable (int4, int4)
+returns bigint
+as '
+declare
+	p_tab_id			alias for $1;
+	p_new_set_id		alias for $2;
+	v_old_set_id		int4;
+	v_origin			int4;
+begin
+	-- ----
+	-- Grab the central configuration lock
+	-- ----
+	lock table @NAMESPACE at .sl_config_lock;
+
+	-- ----
+	-- Get the tables current set
+	-- ----
+	select tab_set into v_old_set_id from @NAMESPACE at .sl_table
+			where tab_id = p_tab_id;
+	if not found then
+		raise exception ''Slony-I: table %d not found'', p_tab_id;
+	end if;
+	
+	-- ----
+	-- Check that both sets exist and originate here
+	-- ----
+	if p_new_set_id = v_old_set_id then
+		raise exception ''Slony-I: set ids cannot be identical'';
+	end if;
+	select set_origin into v_origin from @NAMESPACE at .sl_set
+			where set_id = p_new_set_id;
+	if not found then
+		raise exception ''Slony-I: set % not found'', p_new_set_id;
+	end if;
+	if v_origin != @NAMESPACE at .getLocalNodeId(''_ at CLUSTERNAME@'') then
+		raise exception ''Slony-I: set % does not originate on local node'',
+				p_new_set_id;
+	end if;
+
+	select set_origin into v_origin from @NAMESPACE at .sl_set
+			where set_id = v_old_set_id;
+	if not found then
+		raise exception ''Slony-I: set % not found'', v_old_set_id;
+	end if;
+	if v_origin != @NAMESPACE at .getLocalNodeId(''_ at CLUSTERNAME@'') then
+		raise exception ''Slony-I: set % does not originate on local node'',
+				v_old_set_id;
+	end if;
+
+	-- ----
+	-- Check that both sets are subscribed by the same set of nodes
+	-- ----
+	if exists (select true from @NAMESPACE at .sl_subscribe SUB1
+				where SUB1.sub_set = p_new_set_id
+				and SUB1.sub_receiver not in (select SUB2.sub_receiver
+						from @NAMESPACE at .sl_subscribe SUB2
+						where SUB2.sub_set = v_old_set_id))
+	then
+		raise exception ''Slony-I: subscriber lists of set % and % are different'',
+				p_new_set_id, v_old_set_id;
+	end if;
+
+	if exists (select true from @NAMESPACE at .sl_subscribe SUB1
+				where SUB1.sub_set = v_old_set_id
+				and SUB1.sub_receiver not in (select SUB2.sub_receiver
+						from @NAMESPACE at .sl_subscribe SUB2
+						where SUB2.sub_set = p_new_set_id))
+	then
+		raise exception ''Slony-I: subscriber lists of set % and % are different'',
+				v_old_set_id, p_new_set_id;
+	end if;
+
+	-- ----
+	-- Change the set the table belongs to
+	-- ----
+	perform @NAMESPACE at .createEvent(''_ at CLUSTERNAME@'', ''SYNC'', NULL);
+	perform @NAMESPACE at .setMoveTable_int(p_tab_id, p_new_set_id);
+	return  @NAMESPACE at .createEvent(''_ at CLUSTERNAME@'', ''SET_MOVE_TABLE'', 
+			p_tab_id, p_new_set_id);
+end;
+' language plpgsql;
+
+
+-- ----------------------------------------------------------------------
+-- FUNCTION setMoveTable_int (tab_id, new_set_id)
+--
+--	Process the SET_MOVE_TABLE event.
+-- ----------------------------------------------------------------------
+create or replace function @NAMESPACE at .setMoveTable_int (int4, int4)
+returns int4
+as '
+declare
+	p_tab_id			alias for $1;
+	p_new_set_id		alias for $2;
+begin
+	-- ----
+	-- Grab the central configuration lock
+	-- ----
+	lock table @NAMESPACE at .sl_config_lock;
+	
+	-- ----
+	-- Move the table to the new set
+	-- ----
+	update @NAMESPACE at .sl_table
+			set tab_set = p_new_set_id
+			where tab_id = p_tab_id;
+
+	return p_tab_id;
+end;
+' language plpgsql;
+
+
+-- ----------------------------------------------------------------------
+-- FUNCTION setMoveSequence (seq_id, new_set_id)
+--
+--	Generate the SET_MOVE_SEQUENCE event.
+-- ----------------------------------------------------------------------
+create or replace function @NAMESPACE at .setMoveSequence (int4, int4)
+returns bigint
+as '
+declare
+	p_seq_id			alias for $1;
+	p_new_set_id		alias for $2;
+	v_old_set_id		int4;
+	v_origin			int4;
+begin
+	-- ----
+	-- Grab the central configuration lock
+	-- ----
+	lock table @NAMESPACE at .sl_config_lock;
+
+	-- ----
+	-- Get the sequences current set
+	-- ----
+	select seq_set into v_old_set_id from @NAMESPACE at .sl_sequence
+			where seq_id = p_seq_id;
+	if not found then
+		raise exception ''Slony-I: sequence %d not found'', p_seq_id;
+	end if;
+	
+	-- ----
+	-- Check that both sets exist and originate here
+	-- ----
+	if p_new_set_id = v_old_set_id then
+		raise exception ''Slony-I: set ids cannot be identical'';
+	end if;
+	select set_origin into v_origin from @NAMESPACE at .sl_set
+			where set_id = p_new_set_id;
+	if not found then
+		raise exception ''Slony-I: set % not found'', p_new_set_id;
+	end if;
+	if v_origin != @NAMESPACE at .getLocalNodeId(''_ at CLUSTERNAME@'') then
+		raise exception ''Slony-I: set % does not originate on local node'',
+				p_new_set_id;
+	end if;
+
+	select set_origin into v_origin from @NAMESPACE at .sl_set
+			where set_id = v_old_set_id;
+	if not found then
+		raise exception ''Slony-I: set % not found'', v_old_set_id;
+	end if;
+	if v_origin != @NAMESPACE at .getLocalNodeId(''_ at CLUSTERNAME@'') then
+		raise exception ''Slony-I: set % does not originate on local node'',
+				v_old_set_id;
+	end if;
+
+	-- ----
+	-- Check that both sets are subscribed by the same set of nodes
+	-- ----
+	if exists (select true from @NAMESPACE at .sl_subscribe SUB1
+				where SUB1.sub_set = p_new_set_id
+				and SUB1.sub_receiver not in (select SUB2.sub_receiver
+						from @NAMESPACE at .sl_subscribe SUB2
+						where SUB2.sub_set = v_old_set_id))
+	then
+		raise exception ''Slony-I: subscriber lists of set % and % are different'',
+				p_new_set_id, v_old_set_id;
+	end if;
+
+	if exists (select true from @NAMESPACE at .sl_subscribe SUB1
+				where SUB1.sub_set = v_old_set_id
+				and SUB1.sub_receiver not in (select SUB2.sub_receiver
+						from @NAMESPACE at .sl_subscribe SUB2
+						where SUB2.sub_set = p_new_set_id))
+	then
+		raise exception ''Slony-I: subscriber lists of set % and % are different'',
+				v_old_set_id, p_new_set_id;
+	end if;
+
+	-- ----
+	-- Change the set the sequence belongs to
+	-- ----
+	perform @NAMESPACE at .setMoveSequence_int(p_seq_id, p_new_set_id);
+	return  @NAMESPACE at .createEvent(''_ at CLUSTERNAME@'', ''SET_MOVE_SEQUENCE'', 
+			p_seq_id, p_new_set_id);
+end;
+' language plpgsql;
+
+
+-- ----------------------------------------------------------------------
+-- FUNCTION setMoveSequence_int (seq_id, new_set_id)
+--
+--	Process the SET_MOVE_SEQUENCE event.
+-- ----------------------------------------------------------------------
+create or replace function @NAMESPACE at .setMoveSequence_int (int4, int4)
+returns int4
+as '
+declare
+	p_seq_id			alias for $1;
+	p_new_set_id		alias for $2;
+begin
+	-- ----
+	-- Grab the central configuration lock
+	-- ----
+	lock table @NAMESPACE at .sl_config_lock;
+	
+	-- ----
+	-- Move the sequence to the new set
+	-- ----
+	update @NAMESPACE at .sl_sequence
+			set seq_set = p_new_set_id
+			where seq_id = p_seq_id;
+
+	return p_seq_id;
+end;
+' language plpgsql;
+
+
 -- ----------------------------------------------------------------------
 -- FUNCTION sequenceSetValue (seq_id, seq_origin, ev_seqno, last_value)
 -- ----------------------------------------------------------------------
Index: slonik.h
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/src/slonik/slonik.h,v
retrieving revision 1.17.2.1
retrieving revision 1.17.2.2
diff -Lsrc/slonik/slonik.h -Lsrc/slonik/slonik.h -u -w -r1.17.2.1 -r1.17.2.2
--- src/slonik/slonik.h
+++ src/slonik/slonik.h
@@ -34,6 +34,8 @@
 typedef struct SlonikStmt_set_add_sequence_s	SlonikStmt_set_add_sequence;
 typedef struct SlonikStmt_set_drop_table_s		SlonikStmt_set_drop_table;
 typedef struct SlonikStmt_set_drop_sequence_s	SlonikStmt_set_drop_sequence;
+typedef struct SlonikStmt_set_move_table_s		SlonikStmt_set_move_table;
+typedef struct SlonikStmt_set_move_sequence_s	SlonikStmt_set_move_sequence;
 typedef struct SlonikStmt_table_add_key_s		SlonikStmt_table_add_key;
 typedef struct SlonikStmt_store_trigger_s		SlonikStmt_store_trigger;
 typedef struct SlonikStmt_drop_trigger_s		SlonikStmt_drop_trigger;
@@ -67,6 +69,8 @@
 	STMT_SET_ADD_TABLE,
 	STMT_SET_DROP_SEQUENCE,
 	STMT_SET_DROP_TABLE,
+	STMT_SET_MOVE_SEQUENCE,
+	STMT_SET_MOVE_TABLE,
 	STMT_STORE_LISTEN,
 	STMT_STORE_NODE,
 	STMT_STORE_PATH,
@@ -254,6 +258,7 @@
 	char			   *seq_comment;
 };
 
+
 struct SlonikStmt_set_drop_table_s {
 	SlonikStmt			hdr;
 	int					set_origin;
@@ -268,6 +273,22 @@
 };
 
 
+struct SlonikStmt_set_move_table_s {
+	SlonikStmt			hdr;
+	int					set_origin;
+	int					tab_id;
+	int					new_set_id;
+};
+
+
+struct SlonikStmt_set_move_sequence_s {
+	SlonikStmt			hdr;
+	int					set_origin;
+	int					seq_id;
+	int					new_set_id;
+};
+
+
 struct SlonikStmt_table_add_key_s {
 	SlonikStmt			hdr;
 	int					no_id;
@@ -461,6 +482,8 @@
 extern int		slonik_set_add_sequence(SlonikStmt_set_add_sequence *stmt);
 extern int		slonik_set_drop_table(SlonikStmt_set_drop_table *stmt);
 extern int		slonik_set_drop_sequence(SlonikStmt_set_drop_sequence *stmt);
+extern int		slonik_set_move_table(SlonikStmt_set_move_table *stmt);
+extern int		slonik_set_move_sequence(SlonikStmt_set_move_sequence *stmt);
 extern int		slonik_table_add_key(SlonikStmt_table_add_key *stmt);
 extern int		slonik_store_trigger(SlonikStmt_store_trigger *stmt);
 extern int		slonik_drop_trigger(SlonikStmt_drop_trigger *stmt);
Index: parser.y
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/src/slonik/parser.y,v
retrieving revision 1.16.2.2
retrieving revision 1.16.2.3
diff -Lsrc/slonik/parser.y -Lsrc/slonik/parser.y -u -w -r1.16.2.2 -r1.16.2.3
--- src/slonik/parser.y
+++ src/slonik/parser.y
@@ -32,6 +32,7 @@
 	O_FQNAME,
 	O_ID,
 	O_NEW_ORIGIN,
+	O_NEW_SET,
 	O_NODE_ID,
 	O_OLD_ORIGIN,
 	O_ORIGIN,
@@ -141,6 +142,8 @@
 %type <statement>	stmt_set_add_sequence
 %type <statement>	stmt_set_drop_table
 %type <statement>	stmt_set_drop_sequence
+%type <statement>	stmt_set_move_table
+%type <statement>	stmt_set_move_sequence
 %type <statement>	stmt_table_add_key
 %type <statement>	stmt_store_trigger
 %type <statement>	stmt_drop_trigger
@@ -438,6 +441,10 @@
 						{ $$ = $1; }
 					| stmt_set_drop_sequence
 						{ $$ = $1; }
+					| stmt_set_move_table
+						{ $$ = $1; }
+					| stmt_set_move_sequence
+						{ $$ = $1; }
 					| stmt_store_trigger
 						{ $$ = $1; }
 					| stmt_drop_trigger
@@ -1039,6 +1046,64 @@
 					}
 					;
 
+stmt_set_move_table	: lno K_SET K_MOVE K_TABLE option_list
+					{
+						SlonikStmt_set_move_table *new;
+						statement_option opt[] = {
+							STMT_OPTION_INT( O_ORIGIN, -1 ),
+							STMT_OPTION_INT( O_ID, -1 ),
+							STMT_OPTION_INT( O_NEW_SET, -1 ),
+							STMT_OPTION_END
+						};
+						new = (SlonikStmt_set_move_table *)
+							malloc(sizeof(SlonikStmt_set_move_table));
+						memset(new, 0, sizeof(SlonikStmt_set_move_table));
+						new->hdr.stmt_type		= STMT_SET_MOVE_TABLE;
+						new->hdr.stmt_filename	= current_file;
+						new->hdr.stmt_lno		= $1;
+
+						if (assign_options(opt, $5) == 0) {
+							new->set_origin		= opt[0].ival;
+							new->tab_id			= opt[1].ival;
+							new->new_set_id		= opt[2].ival;
+						}
+						else
+							parser_errors++;
+
+						$$ = (SlonikStmt *)new;
+					}
+					;
+
+stmt_set_move_sequence : lno K_SET K_MOVE K_SEQUENCE option_list
+					{
+						SlonikStmt_set_move_sequence *new;
+						statement_option opt[] = {
+							STMT_OPTION_INT( O_ORIGIN, -1 ),
+							STMT_OPTION_INT( O_ID, -1 ),
+							STMT_OPTION_INT( O_NEW_SET, -1 ),
+							STMT_OPTION_END
+						};
+
+						new = (SlonikStmt_set_move_sequence *)
+								malloc(sizeof(SlonikStmt_set_move_sequence));
+						memset(new, 0, sizeof(SlonikStmt_set_move_sequence));
+						new->hdr.stmt_type		= STMT_SET_MOVE_SEQUENCE;
+						new->hdr.stmt_filename	= current_file;
+						new->hdr.stmt_lno		= $1;
+
+						if (assign_options(opt, $5) == 0)
+						{
+							new->set_origin		= opt[0].ival;
+							new->seq_id			= opt[1].ival;
+							new->new_set_id		= opt[2].ival;
+						}
+						else
+							parser_errors++;
+
+						$$ = (SlonikStmt *)new;
+					}
+					;
+
 stmt_store_trigger	: lno K_STORE K_TRIGGER option_list
 					{
 						SlonikStmt_store_trigger *new;
@@ -1386,6 +1451,11 @@
 						$4->opt_code	= O_NEW_ORIGIN;
 						$$ = $4;
 					}
+					| K_NEW K_SET '=' option_item_id
+					{
+						$4->opt_code	= O_NEW_SET;
+						$$ = $4;
+					}
 					| K_RECEIVER '=' option_item_id
 					{
 						$3->opt_code	= O_RECEIVER;
@@ -1636,6 +1706,7 @@
 		case O_FQNAME:			return "full qualified name";
 		case O_ID:				return "id";
 		case O_NEW_ORIGIN:		return "new origin";
+		case O_NEW_SET:			return "new set";
 		case O_NODE_ID:			return "node id";
 		case O_OLD_ORIGIN:		return "old origin";
 		case O_ORIGIN:			return "origin";
Index: slonik.c
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/src/slonik/slonik.c,v
retrieving revision 1.27.2.3
retrieving revision 1.27.2.4
diff -Lsrc/slonik/slonik.c -Lsrc/slonik/slonik.c -u -w -r1.27.2.3 -r1.27.2.4
--- src/slonik/slonik.c
+++ src/slonik/slonik.c
@@ -633,6 +633,90 @@
 				}
 				break;
 
+			case STMT_SET_MOVE_TABLE:
+				{
+					SlonikStmt_set_move_table *stmt =
+							(SlonikStmt_set_move_table *)hdr;
+
+					/*
+					 * Check that we have the set_id and set_origin
+					 * and that we can reach the origin.
+					 */
+					if (stmt->set_origin < 0)
+					{
+						printf("%s:%d: Error: "
+								"origin must be specified\n",
+								hdr->stmt_filename, hdr->stmt_lno);
+						errors++;
+					}
+					else
+					{
+						if (script_check_adminfo(hdr, stmt->set_origin) < 0)
+							errors++;
+					}
+
+					/*
+					 * Check that we have the table id and new set id
+					 */
+					if (stmt->tab_id < 0)
+					{
+						printf("%s:%d: Error: "
+								"table id must be specified\n",
+								hdr->stmt_filename, hdr->stmt_lno);
+						errors++;
+					}
+					if (stmt->new_set_id < 0)
+					{
+						printf("%s:%d: Error: "
+								"new set id must be specified\n",
+								hdr->stmt_filename, hdr->stmt_lno);
+						errors++;
+					}
+				}
+				break;
+
+			case STMT_SET_MOVE_SEQUENCE:
+				{
+					SlonikStmt_set_move_sequence *stmt =
+							(SlonikStmt_set_move_sequence *)hdr;
+
+					/*
+					 * Check that we have the set_id and set_origin
+					 * and that we can reach the origin.
+					 */
+					if (stmt->set_origin < 0)
+					{
+						printf("%s:%d: Error: "
+								"origin must be specified\n",
+								hdr->stmt_filename, hdr->stmt_lno);
+						errors++;
+					}
+					else
+					{
+						if (script_check_adminfo(hdr, stmt->set_origin) < 0)
+							errors++;
+					}
+
+					/*
+					 * Check that we have the sequence id and new set id
+					 */
+					if (stmt->seq_id < 0)
+					{
+						printf("%s:%d: Error: "
+								"sequence id must be specified\n",
+								hdr->stmt_filename, hdr->stmt_lno);
+						errors++;
+					}
+					if (stmt->new_set_id < 0)
+					{
+						printf("%s:%d: Error: "
+								"new set id must be specified\n",
+								hdr->stmt_filename, hdr->stmt_lno);
+						errors++;
+					}
+				}
+				break;
+
 			case STMT_TABLE_ADD_KEY:
 				{
 					SlonikStmt_table_add_key *stmt =
@@ -1219,6 +1303,26 @@
 				}
 				break;
 
+			case STMT_SET_MOVE_TABLE:
+				{
+					SlonikStmt_set_move_table *stmt =
+							(SlonikStmt_set_move_table *)hdr;
+
+					if (slonik_set_move_table(stmt) < 0)
+						errors++;
+				}
+				break;
+
+			case STMT_SET_MOVE_SEQUENCE:
+				{
+					SlonikStmt_set_move_sequence *stmt =
+							(SlonikStmt_set_move_sequence *)hdr;
+
+					if (slonik_set_move_sequence(stmt) < 0)
+						errors++;
+				}
+				break;
+
 			case STMT_TABLE_ADD_KEY:
 				{
 					SlonikStmt_table_add_key *stmt =
@@ -3065,8 +3169,6 @@
 {
 	SlonikAdmInfo  *adminfo1;
 	SlonDString		query;
-	char		   *idxname;
-	PGresult	   *res;
 	
 	adminfo1 = get_active_adminfo((SlonikStmt *)stmt, stmt->set_origin);
 	if (adminfo1 == NULL)
@@ -3082,7 +3184,6 @@
 				 stmt->hdr.script->clustername,		     
 				 stmt->tab_id);
 	if (db_exec_evcommand((SlonikStmt *)stmt, adminfo1, &query) < 0) {
-		PQclear(res);
 		dstring_free(&query);
 		return -1;
 	}
@@ -3127,6 +3228,62 @@
 
 
 int
+slonik_set_move_table(SlonikStmt_set_move_table *stmt)
+{
+	SlonikAdmInfo  *adminfo1;
+	SlonDString		query;
+	
+	adminfo1 = get_active_adminfo((SlonikStmt *)stmt, stmt->set_origin);
+	if (adminfo1 == NULL)
+		return -1;
+	
+	if (db_begin_xact((SlonikStmt *)stmt, adminfo1) < 0)
+		return -1;
+	
+	dstring_init(&query);
+	
+	slon_mkquery(&query,
+				 "select \"_%s\".setMoveTable(%d, %d); ",
+				 stmt->hdr.script->clustername,		     
+				 stmt->tab_id, stmt->new_set_id);
+	if (db_exec_evcommand((SlonikStmt *)stmt, adminfo1, &query) < 0) {
+		dstring_free(&query);
+		return -1;
+	}
+	dstring_free(&query);
+	return 0;
+}
+
+
+int
+slonik_set_move_sequence(SlonikStmt_set_move_sequence *stmt)
+{
+	SlonikAdmInfo  *adminfo1;
+	SlonDString		query;
+	
+	adminfo1 = get_active_adminfo((SlonikStmt *)stmt, stmt->set_origin);
+	if (adminfo1 == NULL)
+		return -1;
+	
+	if (db_begin_xact((SlonikStmt *)stmt, adminfo1) < 0)
+		return -1;
+	
+	dstring_init(&query);
+	
+	slon_mkquery(&query,
+				 "select \"_%s\".setMoveSequence(%d, %d); ",
+				 stmt->hdr.script->clustername,		     
+				 stmt->seq_id, stmt->new_set_id);
+	if (db_exec_evcommand((SlonikStmt *)stmt, adminfo1, &query) < 0) {
+		dstring_free(&query);
+		return -1;
+	}
+	dstring_free(&query);
+	return 0;
+}
+
+
+int
 slonik_table_add_key(SlonikStmt_table_add_key *stmt)
 {
 	SlonikAdmInfo  *adminfo1;
Index: parser.c
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/src/slonik/Attic/parser.c,v
retrieving revision 1.16.2.2
retrieving revision 1.16.2.3
diff -Lsrc/slonik/parser.c -Lsrc/slonik/parser.c -u -w -r1.16.2.2 -r1.16.2.3
--- src/slonik/parser.c
+++ src/slonik/parser.c
@@ -229,6 +229,7 @@
 	O_FQNAME,
 	O_ID,
 	O_NEW_ORIGIN,
+	O_NEW_SET,
 	O_NODE_ID,
 	O_OLD_ORIGIN,
 	O_ORIGIN,
@@ -306,7 +307,7 @@
 #endif
 
 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
-#line 101 "parser.y"
+#line 102 "parser.y"
 typedef union YYSTYPE {
 	int32			ival;
 	char		   *str;
@@ -315,7 +316,7 @@
 	SlonikStmt	   *statement;
 } YYSTYPE;
 /* Line 191 of yacc.c.  */
-#line 318 "y.tab.c"
+#line 319 "y.tab.c"
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
 # define YYSTYPE_IS_TRIVIAL 1
@@ -327,7 +328,7 @@
 
 
 /* Line 214 of yacc.c.  */
-#line 330 "y.tab.c"
+#line 331 "y.tab.c"
 
 #if ! defined (yyoverflow) || YYERROR_VERBOSE
 
@@ -426,16 +427,16 @@
 /* YYFINAL -- State number of the termination state. */
 #define YYFINAL  4
 /* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   296
+#define YYLAST   306
 
 /* YYNTOKENS -- Number of terminals. */
 #define YYNTOKENS  78
 /* YYNNTS -- Number of nonterminals. */
-#define YYNNTS  56
+#define YYNNTS  58
 /* YYNRULES -- Number of rules. */
-#define YYNRULES  129
+#define YYNRULES  134
 /* YYNRULES -- Number of states. */
-#define YYNSTATES  280
+#define YYNSTATES  290
 
 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
 #define YYUNDEFTOK  2
@@ -492,26 +493,27 @@
       90,    92,    94,    96,    98,   100,   102,   104,   106,   108,
      110,   112,   114,   116,   118,   120,   122,   124,   126,   128,
      130,   132,   134,   136,   138,   140,   142,   144,   146,   148,
-     150,   153,   158,   163,   169,   171,   174,   177,   182,   187,
-     192,   196,   201,   206,   211,   216,   221,   226,   231,   236,
-     242,   248,   254,   260,   266,   271,   276,   281,   286,   291,
-     296,   301,   306,   311,   317,   319,   324,   326,   330,   334,
-     339,   344,   348,   352,   356,   361,   366,   370,   374,   378,
-     382,   386,   391,   396,   401,   406,   411,   417,   421,   425,
-     429,   433,   437,   441,   445,   450,   454,   456,   458,   460,
-     462,   464,   466,   468,   470,   472,   474,   476,   478,   480
+     150,   152,   154,   157,   162,   167,   173,   175,   178,   181,
+     186,   191,   196,   200,   205,   210,   215,   220,   225,   230,
+     235,   240,   246,   252,   258,   264,   270,   276,   282,   287,
+     292,   297,   302,   307,   312,   317,   322,   327,   333,   335,
+     340,   342,   346,   350,   355,   360,   364,   368,   372,   377,
+     382,   387,   391,   395,   399,   403,   407,   412,   417,   422,
+     427,   432,   438,   442,   446,   450,   454,   458,   462,   466,
+     471,   475,   477,   479,   481,   483,   485,   487,   489,   491,
+     493,   495,   497,   499,   501
 };
 
 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
 static const short yyrhs[] =
 {
-      79,     0,    -1,    80,    81,    83,    -1,   133,     8,    35,
-      70,   131,    71,    -1,    82,    -1,    82,    81,    -1,   133,
-      38,   130,     4,    12,    70,   132,    71,    -1,    84,    -1,
-      84,    83,    -1,    85,    -1,    89,    -1,   133,    60,    72,
-      88,    73,    86,    -1,   133,    60,    72,    88,    73,    87,
-      86,    -1,   133,    60,    72,    88,    73,    86,    87,    -1,
-     133,    60,    72,    88,    73,    87,    -1,   133,    60,    72,
+      79,     0,    -1,    80,    81,    83,    -1,   135,     8,    35,
+      70,   133,    71,    -1,    82,    -1,    82,    81,    -1,   135,
+      38,   132,     4,    12,    70,   134,    71,    -1,    84,    -1,
+      84,    83,    -1,    85,    -1,    89,    -1,   135,    60,    72,
+      88,    73,    86,    -1,   135,    60,    72,    88,    73,    87,
+      86,    -1,   135,    60,    72,    88,    73,    86,    87,    -1,
+     135,    60,    72,    88,    73,    87,    -1,   135,    60,    72,
       88,    73,    -1,    41,    17,    72,    83,    73,    -1,    41,
       55,    72,    83,    73,    -1,    89,    -1,    89,    88,    -1,
       90,    -1,    91,    -1,    92,    -1,    95,    -1,    96,    -1,
@@ -520,58 +522,61 @@
      107,    -1,   108,    -1,   109,    -1,   110,    -1,   111,    -1,
      112,    -1,   113,    -1,   114,    -1,   115,    -1,   116,    -1,
      117,    -1,   118,    -1,   119,    -1,   120,    -1,   121,    -1,
-      94,    71,    -1,   133,    16,   132,    71,    -1,   133,    20,
-      93,    71,    -1,   133,    47,    38,   130,    71,    -1,    69,
-      -1,    74,    93,    -1,   133,     1,    -1,   133,    29,     8,
-     122,    -1,   133,    53,    38,   122,    -1,   133,    15,    38,
-     122,    -1,   133,    21,   122,    -1,   133,    61,    38,   122,
-      -1,   133,    53,    43,   122,    -1,   133,    15,    43,   122,
-      -1,   133,    53,    31,   122,    -1,   133,    15,    31,   122,
-      -1,   133,    14,    52,   122,    -1,   133,    15,    52,   122,
-      -1,   133,    33,    52,   122,    -1,   133,    56,     3,    30,
-     122,    -1,   133,    52,     3,    56,   122,    -1,   133,    52,
-       3,    49,   122,    -1,   133,    52,    15,    56,   122,    -1,
-     133,    52,    15,    49,   122,    -1,   133,    53,    58,   122,
-      -1,   133,    15,    58,   122,    -1,   133,    54,    52,   122,
-      -1,   133,    63,    52,   122,    -1,   133,    32,    52,   122,
-      -1,   133,    62,    52,   122,    -1,   133,    34,    52,   122,
-      -1,   133,    19,    48,   122,    -1,   133,    64,    27,   122,
-      -1,   133,    66,    24,    18,   122,    -1,    71,    -1,    75,
-     123,    76,    71,    -1,   124,    -1,   124,    77,   123,    -1,
-      28,    70,   125,    -1,     6,    38,    70,   125,    -1,    18,
-      38,    70,   125,    -1,    51,    70,   125,    -1,     7,    70,
-     125,    -1,    42,    70,   125,    -1,    40,    42,    70,   125,
-      -1,    36,    42,    70,   125,    -1,    46,    70,   125,    -1,
-      44,    70,   125,    -1,    13,    70,   125,    -1,    10,    70,
-     126,    -1,    12,    70,   126,    -1,    52,    28,    70,   125,
-      -1,     3,    28,    70,   125,    -1,    38,    28,    70,   125,
-      -1,    56,    28,    70,   125,    -1,    58,    35,    70,   126,
-      -1,    26,    45,    35,    70,   126,    -1,    30,    70,   126,
-      -1,    30,    70,    50,    -1,    25,    70,   127,    -1,    23,
-      70,   126,    -1,    42,    70,     5,    -1,    11,    70,   125,
-      -1,    11,    70,     5,    -1,    66,    41,    70,   125,    -1,
-      57,    70,   125,    -1,   130,    -1,   132,    -1,   128,    -1,
-     129,    -1,    65,    -1,    41,    -1,    59,    -1,    37,    -1,
-      39,    -1,    22,    -1,    69,    -1,    67,    -1,    68,    -1,
-      -1
+     122,    -1,   123,    -1,    94,    71,    -1,   135,    16,   134,
+      71,    -1,   135,    20,    93,    71,    -1,   135,    47,    38,
+     132,    71,    -1,    69,    -1,    74,    93,    -1,   135,     1,
+      -1,   135,    29,     8,   124,    -1,   135,    53,    38,   124,
+      -1,   135,    15,    38,   124,    -1,   135,    21,   124,    -1,
+     135,    61,    38,   124,    -1,   135,    53,    43,   124,    -1,
+     135,    15,    43,   124,    -1,   135,    53,    31,   124,    -1,
+     135,    15,    31,   124,    -1,   135,    14,    52,   124,    -1,
+     135,    15,    52,   124,    -1,   135,    33,    52,   124,    -1,
+     135,    56,     3,    30,   124,    -1,   135,    52,     3,    56,
+     124,    -1,   135,    52,     3,    49,   124,    -1,   135,    52,
+      15,    56,   124,    -1,   135,    52,    15,    49,   124,    -1,
+     135,    52,    34,    56,   124,    -1,   135,    52,    34,    49,
+     124,    -1,   135,    53,    58,   124,    -1,   135,    15,    58,
+     124,    -1,   135,    54,    52,   124,    -1,   135,    63,    52,
+     124,    -1,   135,    32,    52,   124,    -1,   135,    62,    52,
+     124,    -1,   135,    34,    52,   124,    -1,   135,    19,    48,
+     124,    -1,   135,    64,    27,   124,    -1,   135,    66,    24,
+      18,   124,    -1,    71,    -1,    75,   125,    76,    71,    -1,
+     126,    -1,   126,    77,   125,    -1,    28,    70,   127,    -1,
+       6,    38,    70,   127,    -1,    18,    38,    70,   127,    -1,
+      51,    70,   127,    -1,     7,    70,   127,    -1,    42,    70,
+     127,    -1,    40,    42,    70,   127,    -1,    36,    42,    70,
+     127,    -1,    36,    52,    70,   127,    -1,    46,    70,   127,
+      -1,    44,    70,   127,    -1,    13,    70,   127,    -1,    10,
+      70,   128,    -1,    12,    70,   128,    -1,    52,    28,    70,
+     127,    -1,     3,    28,    70,   127,    -1,    38,    28,    70,
+     127,    -1,    56,    28,    70,   127,    -1,    58,    35,    70,
+     128,    -1,    26,    45,    35,    70,   128,    -1,    30,    70,
+     128,    -1,    30,    70,    50,    -1,    25,    70,   129,    -1,
+      23,    70,   128,    -1,    42,    70,     5,    -1,    11,    70,
+     127,    -1,    11,    70,     5,    -1,    66,    41,    70,   127,
+      -1,    57,    70,   127,    -1,   132,    -1,   134,    -1,   130,
+      -1,   131,    -1,    65,    -1,    41,    -1,    59,    -1,    37,
+      -1,    39,    -1,    22,    -1,    69,    -1,    67,    -1,    68,
+      -1,    -1
 };
 
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const unsigned short yyrline[] =
 {
-       0,   244,   244,   259,   265,   267,   271,   289,   291,   295,
-     297,   301,   318,   336,   354,   371,   388,   391,   395,   397,
-     401,   403,   405,   407,   409,   411,   413,   415,   417,   419,
-     421,   423,   425,   427,   429,   431,   433,   435,   437,   439,
-     441,   443,   445,   447,   449,   451,   453,   455,   457,   459,
-     461,   466,   483,   500,   517,   519,   523,   538,   566,   596,
-     624,   652,   678,   710,   740,   770,   800,   830,   858,   888,
-     916,   954,   988,  1014,  1042,  1072,  1102,  1134,  1162,  1190,
-    1218,  1248,  1279,  1305,  1337,  1339,  1343,  1345,  1349,  1354,
-    1359,  1364,  1369,  1374,  1379,  1384,  1389,  1394,  1399,  1404,
-    1409,  1414,  1419,  1424,  1429,  1434,  1439,  1444,  1449,  1462,
-    1467,  1472,  1485,  1490,  1503,  1508,  1515,  1529,  1543,  1555,
-    1569,  1570,  1571,  1574,  1575,  1576,  1579,  1585,  1597,  1610
+       0,   247,   247,   262,   268,   270,   274,   292,   294,   298,
+     300,   304,   321,   339,   357,   374,   391,   394,   398,   400,
+     404,   406,   408,   410,   412,   414,   416,   418,   420,   422,
+     424,   426,   428,   430,   432,   434,   436,   438,   440,   442,
+     444,   446,   448,   450,   452,   454,   456,   458,   460,   462,
+     464,   466,   468,   473,   490,   507,   524,   526,   530,   545,
+     573,   603,   631,   659,   685,   717,   747,   777,   807,   837,
+     865,   895,   923,   961,   995,  1021,  1049,  1077,  1107,  1137,
+    1167,  1199,  1227,  1255,  1283,  1313,  1344,  1370,  1402,  1404,
+    1408,  1410,  1414,  1419,  1424,  1429,  1434,  1439,  1444,  1449,
+    1454,  1459,  1464,  1469,  1474,  1479,  1484,  1489,  1494,  1499,
+    1504,  1509,  1514,  1519,  1532,  1537,  1542,  1555,  1560,  1573,
+    1578,  1585,  1599,  1613,  1625,  1639,  1640,  1641,  1644,  1645,
+    1646,  1649,  1655,  1667,  1680
 };
 #endif
 
@@ -601,9 +606,10 @@
   "stmt_drop_path", "stmt_store_listen", "stmt_drop_listen", 
   "stmt_create_set", "stmt_drop_set", "stmt_merge_set", 
   "stmt_table_add_key", "stmt_set_add_table", "stmt_set_add_sequence", 
-  "stmt_set_drop_table", "stmt_set_drop_sequence", "stmt_store_trigger", 
-  "stmt_drop_trigger", "stmt_subscribe_set", "stmt_unsubscribe_set", 
-  "stmt_lock_set", "stmt_unlock_set", "stmt_move_set", "stmt_ddl_script", 
+  "stmt_set_drop_table", "stmt_set_drop_sequence", "stmt_set_move_table", 
+  "stmt_set_move_sequence", "stmt_store_trigger", "stmt_drop_trigger", 
+  "stmt_subscribe_set", "stmt_unsubscribe_set", "stmt_lock_set", 
+  "stmt_unlock_set", "stmt_move_set", "stmt_ddl_script", 
   "stmt_update_functions", "stmt_wait_event", "option_list", 
   "option_list_items", "option_list_item", "option_item_id", 
   "option_item_literal", "option_item_yn", "option_item_yn_yes", 
@@ -635,14 +641,15 @@
       89,    89,    89,    89,    89,    89,    89,    89,    89,    89,
       89,    89,    89,    89,    89,    89,    89,    89,    89,    89,
       89,    89,    89,    89,    89,    89,    89,    89,    89,    89,
-      89,    90,    91,    92,    93,    93,    94,    95,    96,    97,
-      98,    99,   100,   101,   102,   103,   104,   105,   106,   107,
-     108,   109,   110,   111,   112,   113,   114,   115,   116,   117,
-     118,   119,   120,   121,   122,   122,   123,   123,   124,   124,
-     124,   124,   124,   124,   124,   124,   124,   124,   124,   124,
-     124,   124,   124,   124,   124,   124,   124,   124,   124,   124,
-     124,   124,   124,   124,   124,   124,   125,   126,   127,   127,
-     128,   128,   128,   129,   129,   129,   130,   131,   132,   133
+      89,    89,    89,    90,    91,    92,    93,    93,    94,    95,
+      96,    97,    98,    99,   100,   101,   102,   103,   104,   105,
+     106,   107,   108,   109,   110,   111,   112,   113,   114,   115,
+     116,   117,   118,   119,   120,   121,   122,   123,   124,   124,
+     125,   125,   126,   126,   126,   126,   126,   126,   126,   126,
+     126,   126,   126,   126,   126,   126,   126,   126,   126,   126,
+     126,   126,   126,   126,   126,   126,   126,   126,   126,   126,
+     126,   127,   128,   129,   129,   130,   130,   130,   131,   131,
+     131,   132,   133,   134,   135
 };
 
 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
@@ -653,14 +660,15 @@
        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
-       2,     4,     4,     5,     1,     2,     2,     4,     4,     4,
-       3,     4,     4,     4,     4,     4,     4,     4,     4,     5,
-       5,     5,     5,     5,     4,     4,     4,     4,     4,     4,
-       4,     4,     4,     5,     1,     4,     1,     3,     3,     4,
-       4,     3,     3,     3,     4,     4,     3,     3,     3,     3,
-       3,     4,     4,     4,     4,     4,     5,     3,     3,     3,
-       3,     3,     3,     3,     4,     3,     1,     1,     1,     1,
-       1,     1,     1,     1,     1,     1,     1,     1,     1,     0
+       1,     1,     2,     4,     4,     5,     1,     2,     2,     4,
+       4,     4,     3,     4,     4,     4,     4,     4,     4,     4,
+       4,     5,     5,     5,     5,     5,     5,     5,     4,     4,
+       4,     4,     4,     4,     4,     4,     4,     5,     1,     4,
+       1,     3,     3,     4,     4,     3,     3,     3,     4,     4,
+       4,     3,     3,     3,     3,     3,     4,     4,     4,     4,
+       4,     5,     3,     3,     3,     3,     3,     3,     3,     4,
+       3,     1,     1,     1,     1,     1,     1,     1,     1,     1,
+       1,     1,     1,     1,     0
 };
 
 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@@ -668,161 +676,165 @@
    means the default is an error.  */
 static const unsigned char yydefact[] =
 {
-     129,     0,   129,     0,     1,   129,     4,     0,     0,     2,
-     129,     9,    10,    20,    21,    22,     0,    23,    24,    25,
+     134,     0,   134,     0,     1,   134,     4,     0,     0,     2,
+     134,     9,    10,    20,    21,    22,     0,    23,    24,    25,
       26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
       36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
-      46,    47,    48,    49,     0,     5,     0,     0,     8,    50,
-      56,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+      46,    47,    48,    49,    50,    51,     0,     5,     0,     0,
+       8,    52,    58,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,   126,     0,     0,     0,     0,     0,     0,     0,
-       0,   128,     0,     0,    54,     0,     0,    84,     0,    60,
+       0,     0,     0,     0,   131,     0,     0,     0,     0,     0,
+       0,     0,     0,   133,     0,     0,    56,     0,     0,    88,
+       0,    62,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   134,     0,     0,     0,
+       0,     0,     0,   132,     0,    68,    67,    61,    65,    69,
+      79,    53,    85,    57,    54,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   129,     0,     0,     0,     0,     0,     0,
-     127,     0,    66,    65,    59,    63,    67,    75,    51,    81,
-      55,    52,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,    86,    57,
-      78,    68,    80,     0,     0,     0,     0,     0,    64,    58,
-      62,    74,    76,     0,     0,   129,     0,    61,    79,    77,
-      82,     0,     0,     3,     0,     0,     0,     0,     0,     0,
+       0,    90,    59,    82,    70,    84,     0,     0,     0,     0,
+       0,     0,     0,    66,    60,    64,    78,    80,     0,     0,
+     134,     0,    63,    83,    81,    86,     0,     0,     3,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,    53,    71,    70,    73,    72,    69,    15,    19,    83,
-       0,     0,     0,    92,   116,    99,   117,   113,   112,   100,
-      98,     0,   110,   125,   123,   124,   121,   122,   120,   109,
-     118,   119,     0,    88,   108,   107,     0,     0,     0,   111,
-      93,    97,    96,    91,     0,     0,   115,     0,     0,    85,
-      87,     0,    11,    14,     0,   102,    89,    90,     0,    95,
-     103,    94,   101,   104,   105,   114,     0,     0,     0,    13,
-       0,    12,     6,   106,   129,   129,     0,     0,    16,    17
+       0,     0,     0,     0,     0,     0,     0,    55,    73,    72,
+      75,    74,    77,    76,    71,    15,    19,    87,     0,     0,
+       0,    96,   121,   104,   122,   118,   117,   105,   103,     0,
+     115,   130,   128,   129,   126,   127,   125,   114,   123,   124,
+       0,    92,   113,   112,     0,     0,     0,     0,   116,    97,
+     102,   101,    95,     0,     0,   120,     0,     0,    89,    91,
+       0,    11,    14,     0,   107,    93,    94,     0,    99,   100,
+     108,    98,   106,   109,   110,   119,     0,     0,     0,    13,
+       0,    12,     6,   111,   134,   134,     0,     0,    16,    17
 };
 
 /* YYDEFGOTO[NTERM-NUM]. */
 static const short yydefgoto[] =
 {
-      -1,     1,     2,     5,     6,     9,    10,    11,   252,   253,
-     164,    12,    13,    14,    15,    86,    16,    17,    18,    19,
+      -1,     1,     2,     5,     6,     9,    10,    11,   261,   262,
+     169,    12,    13,    14,    15,    88,    16,    17,    18,    19,
       20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
       30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
-      40,    41,    42,    43,    89,   147,   148,   213,   215,   229,
-     230,   231,   214,   111,   216,    44
+      40,    41,    42,    43,    44,    45,    91,   150,   151,   221,
+     223,   237,   238,   239,   222,   114,   224,    46
 };
 
 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
    STATE-NUM.  */
-#define YYPACT_NINF -165
+#define YYPACT_NINF -170
 static const short yypact[] =
 {
-    -165,    20,  -165,    13,  -165,  -165,    14,    21,    15,  -165,
-       4,  -165,  -165,  -165,  -165,  -165,   -20,  -165,  -165,  -165,
-    -165,  -165,  -165,  -165,  -165,  -165,  -165,  -165,  -165,  -165,
-    -165,  -165,  -165,  -165,  -165,  -165,  -165,  -165,  -165,  -165,
-    -165,  -165,  -165,  -165,   109,  -165,    -8,     9,  -165,  -165,
-    -165,    10,    35,    16,    32,   -11,    -1,    73,    30,    34,
-      40,    57,    33,    68,    44,    95,    31,    69,    61,    62,
-      88,    92,  -165,   113,    51,    -1,    -1,    -1,    -1,    -1,
-      -1,  -165,    48,    -1,  -165,   -11,    49,  -165,   230,  -165,
-      -1,    -1,    -1,    -1,    -8,   -26,    -3,    -1,    -1,    -1,
-      -1,    -1,    91,  -165,    -1,    -1,    -1,    -1,   104,   115,
-    -165,    60,  -165,  -165,  -165,  -165,  -165,  -165,  -165,  -165,
-    -165,  -165,   105,    94,    64,    65,    66,    67,    70,   101,
-      74,    75,   102,    76,    78,   107,   122,   110,    81,    83,
-      84,    85,   129,   130,    90,   132,   127,    98,    99,  -165,
-    -165,  -165,  -165,   114,    -1,    -1,    -1,    -1,  -165,  -165,
-    -165,  -165,  -165,    -1,   108,   116,   163,  -165,  -165,  -165,
-    -165,    -1,   117,  -165,   118,   120,    -8,    16,     0,    16,
-      -8,   121,    16,     6,   145,    -8,   -31,   123,   124,   128,
-       3,    -8,    -8,    -8,   131,   133,    -8,   134,   135,   136,
-     230,  -165,  -165,  -165,  -165,  -165,  -165,   158,  -165,  -165,
-      16,    -8,    -8,  -165,  -165,  -165,  -165,  -165,  -165,  -165,
-    -165,    -8,  -165,  -165,  -165,  -165,  -165,  -165,  -165,  -165,
-    -165,  -165,   138,  -165,  -165,  -165,    -8,    -8,    -8,  -165,
-    -165,  -165,  -165,  -165,    -8,    -8,  -165,    16,    -8,  -165,
-    -165,    12,   159,   161,   140,  -165,  -165,  -165,    16,  -165,
-    -165,  -165,  -165,  -165,  -165,  -165,   137,   141,   151,  -165,
-     169,  -165,  -165,  -165,  -165,  -165,   139,   147,  -165,  -165
+    -170,    20,  -170,    21,  -170,  -170,     7,    22,    23,  -170,
+       4,  -170,  -170,  -170,  -170,  -170,     2,  -170,  -170,  -170,
+    -170,  -170,  -170,  -170,  -170,  -170,  -170,  -170,  -170,  -170,
+    -170,  -170,  -170,  -170,  -170,  -170,  -170,  -170,  -170,  -170,
+    -170,  -170,  -170,  -170,  -170,  -170,   114,  -170,     5,     9,
+    -170,  -170,  -170,    19,    45,    12,    34,    -8,   -23,    76,
+      47,    49,    50,    58,    44,    78,    52,   102,    42,    68,
+      65,    66,    95,   100,  -170,   121,    59,   -23,   -23,   -23,
+     -23,   -23,   -23,  -170,    56,   -23,  -170,    -8,    60,  -170,
+     240,  -170,   -23,   -23,   -23,   -23,     5,   -26,   -12,    -6,
+     -23,   -23,   -23,   -23,   -23,   107,  -170,   -23,   -23,   -23,
+     -23,   120,   127,  -170,    61,  -170,  -170,  -170,  -170,  -170,
+    -170,  -170,  -170,  -170,  -170,   112,   103,    72,    74,    75,
+      79,    80,   113,    82,    83,   109,    85,    86,   -21,   129,
+     116,    89,    90,    92,    93,   136,   144,   111,   138,   145,
+     115,   108,  -170,  -170,  -170,  -170,   119,   -23,   -23,   -23,
+     -23,   -23,   -23,  -170,  -170,  -170,  -170,  -170,   -23,   106,
+     122,   168,  -170,  -170,  -170,  -170,   -23,   123,  -170,   124,
+     126,     5,    12,     0,    12,     5,   128,    12,    16,   157,
+       5,   -22,   133,   134,   135,   137,     3,     5,     5,     5,
+     139,   140,     5,   141,   142,   143,   240,  -170,  -170,  -170,
+    -170,  -170,  -170,  -170,  -170,   158,  -170,  -170,    12,     5,
+       5,  -170,  -170,  -170,  -170,  -170,  -170,  -170,  -170,     5,
+    -170,  -170,  -170,  -170,  -170,  -170,  -170,  -170,  -170,  -170,
+     146,  -170,  -170,  -170,     5,     5,     5,     5,  -170,  -170,
+    -170,  -170,  -170,     5,     5,  -170,    12,     5,  -170,  -170,
+      -1,   165,   167,   147,  -170,  -170,  -170,    12,  -170,  -170,
+    -170,  -170,  -170,  -170,  -170,  -170,   151,   153,   162,  -170,
+     196,  -170,  -170,  -170,  -170,  -170,   154,   155,  -170,  -170
 };
 
 /* YYPGOTO[NTERM-NUM].  */
 static const short yypgoto[] =
 {
-    -165,  -165,  -165,   208,  -165,   -10,  -165,  -165,   -35,   -29,
-      56,   -97,  -165,  -165,  -165,   143,  -165,  -165,  -165,  -165,
-    -165,  -165,  -165,  -165,  -165,  -165,  -165,  -165,  -165,  -165,
-    -165,  -165,  -165,  -165,  -165,  -165,  -165,  -165,  -165,  -165,
-    -165,  -165,  -165,  -165,   -66,    22,  -165,  -136,  -164,  -165,
-    -165,  -165,   -30,  -165,   -51,     1
+    -170,  -170,  -170,   213,  -170,   -10,  -170,  -170,   -36,   -28,
+      67,  -100,  -170,  -170,  -170,   148,  -170,  -170,  -170,  -170,
+    -170,  -170,  -170,  -170,  -170,  -170,  -170,  -170,  -170,  -170,
+    -170,  -170,  -170,  -170,  -170,  -170,  -170,  -170,  -170,  -170,
+    -170,  -170,  -170,  -170,  -170,  -170,   -68,    30,  -170,  -134,
+    -169,  -170,  -170,  -170,   -29,  -170,   -53,     1
 };
 
 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
    positive, shift that token.  If negative, reduce the rule which
    number is the opposite.  If zero, do what YYDEFACT says.
    If YYTABLE_NINF, syntax error.  */
-#define YYTABLE_NINF -130
+#define YYTABLE_NINF -135
 static const short yytable[] =
 {
-      48,     3,    82,     7,    -7,   217,   165,     7,   239,   112,
-     113,   114,   115,   116,   117,   219,    73,   119,   222,   234,
-       4,     8,   235,   154,   149,   150,   151,   152,   223,   266,
-     155,   158,   159,   160,   161,   162,    95,    81,   167,   168,
-     169,   170,   218,   224,   220,   225,   156,   226,    96,   233,
-      47,    49,  -129,   157,   240,   241,   242,   243,    84,    46,
-     246,    72,    75,    85,   153,   227,    76,   267,   165,    72,
-      87,   228,    72,    77,    88,   255,   256,    -7,    78,    74,
-      83,    90,    91,   264,    81,   257,    92,    79,   202,   203,
-     204,   205,    93,    80,   273,    94,   101,   206,   102,    97,
-     259,   260,   261,   103,   166,   209,    98,   104,   262,   263,
-      50,    99,   265,   105,   106,   107,   108,   109,   110,   118,
-     121,   163,   171,    51,    52,    53,   100,   172,    54,    55,
-      56,   173,   175,   174,   176,   177,   178,   179,    57,   181,
-     180,    58,    59,    60,   182,   183,   185,   184,   186,   187,
-     188,   190,   189,   191,   192,   193,    61,   194,   195,   254,
-     196,    62,    63,    64,    50,    65,   166,   197,   198,    66,
-      67,    68,    69,    70,   199,    71,   200,    51,    52,    53,
-     232,   207,    54,    55,    56,   201,   266,   210,   211,   -18,
-     212,   221,    57,   236,   237,    58,    59,    60,   238,   251,
-     268,   244,   270,   245,   247,   248,   267,   249,   258,   274,
-      61,   272,   278,   275,    45,    62,    63,    64,   271,    65,
-     279,   208,   250,   269,    67,    68,    69,    70,   120,    71,
-       0,     0,     0,   122,     0,     0,   123,   124,     0,     0,
-     125,   126,   127,   128,     0,     0,     0,     0,   129,     0,
-       0,     0,     0,   130,     0,   131,   132,     0,   133,     0,
-     134,     0,     0,     0,   276,   277,   135,     0,   136,     0,
-     137,     0,   138,     0,   139,     0,   140,     0,     0,     0,
-       0,   141,   142,     0,     0,     0,   143,   144,   145,     0,
-       0,     0,     0,     0,     0,     0,   146
+      50,     3,    84,     7,    -7,   225,   170,     7,   248,   115,
+     116,   117,   118,   119,   120,   227,   276,   122,   230,    75,
+       4,   192,   243,   157,   152,   153,   154,   155,   242,     8,
+     158,   193,   163,   164,   165,   166,   167,   159,   231,   172,
+     173,   174,   175,   161,   160,  -134,    83,    97,    89,   226,
+     162,   228,    90,   232,   277,   233,   241,   234,    49,    98,
+      48,    86,   249,   250,   251,   252,    87,   156,   255,    74,
+     170,    77,    74,    51,    74,   235,    78,    -7,    99,    76,
+      83,   236,    85,    79,    92,   264,   265,   274,    80,   208,
+     209,   210,   211,   212,   213,   266,    96,    81,   283,    93,
+     214,    94,    95,    82,   104,   105,   107,   171,   217,   100,
+     268,   269,   270,   271,   106,    52,   101,   108,   109,   272,
+     273,   102,   110,   275,   111,   112,   113,   121,    53,    54,
+      55,   124,   178,    56,    57,    58,   103,   168,   176,   177,
+     179,   180,   181,    59,   182,   183,    60,    61,    62,   184,
+     185,   186,   187,   188,   189,   190,   191,   194,   195,   196,
+     197,    63,   198,   199,   200,   263,    64,    65,    66,    52,
+      67,   171,   201,   203,    68,    69,    70,    71,    72,   215,
+      73,   202,    53,    54,    55,   206,   204,    56,    57,    58,
+     207,   205,   240,   218,   219,   -18,   220,    59,   229,   260,
+      60,    61,    62,   244,   245,   246,   278,   247,   280,   253,
+     254,   256,   257,   276,   258,    63,   267,   277,   282,    47,
+      64,    65,    66,   284,    67,   285,   281,   288,   289,    69,
+      70,    71,    72,   279,    73,   123,   259,   216,     0,     0,
+       0,     0,     0,   125,     0,     0,   126,   127,     0,     0,
+     128,   129,   130,   131,     0,     0,     0,     0,   132,     0,
+       0,     0,     0,   133,     0,   134,   135,     0,   136,     0,
+     137,     0,     0,     0,   286,   287,   138,     0,   139,     0,
+     140,     0,   141,     0,   142,     0,   143,     0,     0,     0,
+       0,   144,   145,     0,     0,     0,   146,   147,   148,     0,
+       0,     0,     0,     0,     0,     0,   149
 };
 
 static const short yycheck[] =
 {
-      10,     0,    53,     2,     0,     5,   103,     6,     5,    75,
-      76,    77,    78,    79,    80,   179,    46,    83,   182,    50,
-       0,     8,   186,    49,    90,    91,    92,    93,    22,    17,
-      56,    97,    98,    99,   100,   101,     3,    68,   104,   105,
-     106,   107,   178,    37,   180,    39,    49,    41,    15,   185,
-      35,    71,    38,    56,   190,   191,   192,   193,    69,    38,
-     196,    69,    52,    74,    94,    59,    31,    55,   165,    69,
-      71,    65,    69,    38,    75,   211,   212,    73,    43,    70,
-      48,     8,    52,   247,    68,   221,    52,    52,   154,   155,
-     156,   157,    52,    58,   258,    38,    52,   163,     3,    31,
-     236,   237,   238,    72,   103,   171,    38,    38,   244,   245,
-       1,    43,   248,    52,    52,    27,    24,     4,    67,    71,
-      71,    30,    18,    14,    15,    16,    58,    12,    19,    20,
-      21,    71,    38,    28,    70,    70,    70,    70,    29,    38,
-      70,    32,    33,    34,    70,    70,    70,    45,    70,    42,
-      28,    70,    42,    70,    70,    70,    47,    28,    28,   210,
-      70,    52,    53,    54,     1,    56,   165,    35,    41,    60,
-      61,    62,    63,    64,    76,    66,    77,    14,    15,    16,
-      35,    73,    19,    20,    21,    71,    17,    70,    70,    73,
-      70,    70,    29,    70,    70,    32,    33,    34,    70,    41,
-      41,    70,    41,    70,    70,    70,    55,    71,    70,    72,
-      47,    71,    73,    72,     6,    52,    53,    54,   253,    56,
-      73,   165,   200,   252,    61,    62,    63,    64,    85,    66,
+      10,     0,    55,     2,     0,     5,   106,     6,     5,    77,
+      78,    79,    80,    81,    82,   184,    17,    85,   187,    48,
+       0,    42,   191,    49,    92,    93,    94,    95,    50,     8,
+      56,    52,   100,   101,   102,   103,   104,    49,    22,   107,
+     108,   109,   110,    49,    56,    38,    68,     3,    71,   183,
+      56,   185,    75,    37,    55,    39,   190,    41,    35,    15,
+      38,    69,   196,   197,   198,   199,    74,    96,   202,    69,
+     170,    52,    69,    71,    69,    59,    31,    73,    34,    70,
+      68,    65,    48,    38,     8,   219,   220,   256,    43,   157,
+     158,   159,   160,   161,   162,   229,    38,    52,   267,    52,
+     168,    52,    52,    58,    52,     3,    38,   106,   176,    31,
+     244,   245,   246,   247,    72,     1,    38,    52,    52,   253,
+     254,    43,    27,   257,    24,     4,    67,    71,    14,    15,
+      16,    71,    71,    19,    20,    21,    58,    30,    18,    12,
+      28,    38,    70,    29,    70,    70,    32,    33,    34,    70,
+      70,    38,    70,    70,    45,    70,    70,    28,    42,    70,
+      70,    47,    70,    70,    28,   218,    52,    53,    54,     1,
+      56,   170,    28,    35,    60,    61,    62,    63,    64,    73,
+      66,    70,    14,    15,    16,    77,    41,    19,    20,    21,
+      71,    76,    35,    70,    70,    73,    70,    29,    70,    41,
+      32,    33,    34,    70,    70,    70,    41,    70,    41,    70,
+      70,    70,    70,    17,    71,    47,    70,    55,    71,     6,
+      52,    53,    54,    72,    56,    72,   262,    73,    73,    61,
+      62,    63,    64,   261,    66,    87,   206,   170,    -1,    -1,
       -1,    -1,    -1,     3,    -1,    -1,     6,     7,    -1,    -1,
       10,    11,    12,    13,    -1,    -1,    -1,    -1,    18,    -1,
       -1,    -1,    -1,    23,    -1,    25,    26,    -1,    28,    -1,
-      30,    -1,    -1,    -1,   274,   275,    36,    -1,    38,    -1,
+      30,    -1,    -1,    -1,   284,   285,    36,    -1,    38,    -1,
       40,    -1,    42,    -1,    44,    -1,    46,    -1,    -1,    -1,
       -1,    51,    52,    -1,    -1,    -1,    56,    57,    58,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    66
@@ -832,34 +844,35 @@
    symbol of state STATE-NUM.  */
 static const unsigned char yystos[] =
 {
-       0,    79,    80,   133,     0,    81,    82,   133,     8,    83,
+       0,    79,    80,   135,     0,    81,    82,   135,     8,    83,
       84,    85,    89,    90,    91,    92,    94,    95,    96,    97,
       98,    99,   100,   101,   102,   103,   104,   105,   106,   107,
      108,   109,   110,   111,   112,   113,   114,   115,   116,   117,
-     118,   119,   120,   121,   133,    81,    38,    35,    83,    71,
-       1,    14,    15,    16,    19,    20,    21,    29,    32,    33,
-      34,    47,    52,    53,    54,    56,    60,    61,    62,    63,
-      64,    66,    69,   130,    70,    52,    31,    38,    43,    52,
-      58,    68,   132,    48,    69,    74,    93,    71,    75,   122,
-       8,    52,    52,    52,    38,     3,    15,    31,    38,    43,
-      58,    52,     3,    72,    38,    52,    52,    27,    24,     4,
-      67,   131,   122,   122,   122,   122,   122,   122,    71,   122,
-      93,    71,     3,     6,     7,    10,    11,    12,    13,    18,
-      23,    25,    26,    28,    30,    36,    38,    40,    42,    44,
-      46,    51,    52,    56,    57,    58,    66,   123,   124,   122,
-     122,   122,   122,   130,    49,    56,    49,    56,   122,   122,
-     122,   122,   122,    30,    88,    89,   133,   122,   122,   122,
-     122,    18,    12,    71,    28,    38,    70,    70,    70,    70,
-      70,    38,    70,    70,    45,    70,    70,    42,    28,    42,
-      70,    70,    70,    70,    28,    28,    70,    35,    41,    76,
-      77,    71,   122,   122,   122,   122,   122,    73,    88,   122,
-      70,    70,    70,   125,   130,   126,   132,     5,   125,   126,
-     125,    70,   126,    22,    37,    39,    41,    59,    65,   127,
-     128,   129,    35,   125,    50,   126,    70,    70,    70,     5,
-     125,   125,   125,   125,    70,    70,   125,    70,    70,    71,
-     123,    41,    86,    87,   132,   125,   125,   125,    70,   125,
-     125,   125,   125,   125,   126,   125,    17,    55,    41,    87,
-      41,    86,    71,   126,    72,    72,    83,    83,    73,    73
+     118,   119,   120,   121,   122,   123,   135,    81,    38,    35,
+      83,    71,     1,    14,    15,    16,    19,    20,    21,    29,
+      32,    33,    34,    47,    52,    53,    54,    56,    60,    61,
+      62,    63,    64,    66,    69,   132,    70,    52,    31,    38,
+      43,    52,    58,    68,   134,    48,    69,    74,    93,    71,
+      75,   124,     8,    52,    52,    52,    38,     3,    15,    34,
+      31,    38,    43,    58,    52,     3,    72,    38,    52,    52,
+      27,    24,     4,    67,   133,   124,   124,   124,   124,   124,
+     124,    71,   124,    93,    71,     3,     6,     7,    10,    11,
+      12,    13,    18,    23,    25,    26,    28,    30,    36,    38,
+      40,    42,    44,    46,    51,    52,    56,    57,    58,    66,
+     125,   126,   124,   124,   124,   124,   132,    49,    56,    49,
+      56,    49,    56,   124,   124,   124,   124,   124,    30,    88,
+      89,   135,   124,   124,   124,   124,    18,    12,    71,    28,
+      38,    70,    70,    70,    70,    70,    38,    70,    70,    45,
+      70,    70,    42,    52,    28,    42,    70,    70,    70,    70,
+      28,    28,    70,    35,    41,    76,    77,    71,   124,   124,
+     124,   124,   124,   124,   124,    73,    88,   124,    70,    70,
+      70,   127,   132,   128,   134,     5,   127,   128,   127,    70,
+     128,    22,    37,    39,    41,    59,    65,   129,   130,   131,
+      35,   127,    50,   128,    70,    70,    70,    70,     5,   127,
+     127,   127,   127,    70,    70,   127,    70,    70,    71,   125,
+      41,    86,    87,   134,   127,   127,   127,    70,   127,   127,
+     127,   127,   127,   127,   128,   127,    17,    55,    41,    87,
+      41,    86,    71,   128,    72,    72,    83,    83,    73,    73
 };
 
 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
@@ -1469,7 +1482,7 @@
   switch (yyn)
     {
         case 2:
-#line 247 "parser.y"
+#line 250 "parser.y"
     {
 						parser_script = (SlonikScript *)
 								malloc(sizeof(SlonikScript));
@@ -1483,24 +1496,24 @@
     break;
 
   case 3:
-#line 260 "parser.y"
+#line 263 "parser.y"
     {
 						yyval.str = yyvsp[-1].str;
 					}
     break;
 
   case 4:
-#line 266 "parser.y"
+#line 269 "parser.y"
     { yyval.adm_info = yyvsp[0].adm_info; }
     break;
 
   case 5:
-#line 268 "parser.y"
+#line 271 "parser.y"
     { yyvsp[-1].adm_info->next = yyvsp[0].adm_info; yyval.adm_info = yyvsp[-1].adm_info; }
     break;
 
   case 6:
-#line 272 "parser.y"
+#line 275 "parser.y"
     {
 						SlonikAdmInfo	   *new;
 
@@ -1519,27 +1532,27 @@
     break;
 
   case 7:
-#line 290 "parser.y"
+#line 293 "parser.y"
     { yyval.statement = yyvsp[0].statement; }
     break;
 
   case 8:
-#line 292 "parser.y"
+#line 295 "parser.y"
     { yyvsp[-1].statement->next = yyvsp[0].statement; yyval.statement = yyvsp[-1].statement; }
     break;
 
   case 9:
-#line 296 "parser.y"
+#line 299 "parser.y"
     { yyval.statement = yyvsp[0].statement; }
     break;
 
   case 10:
-#line 298 "parser.y"
+#line 301 "parser.y"
     { yyval.statement = yyvsp[0].statement; }
     break;
 
   case 11:
-#line 303 "parser.y"
+#line 306 "parser.y"
     {
 						SlonikStmt_try *new;
 
@@ -1558,7 +1571,7 @@
     break;
 
   case 12:
-#line 320 "parser.y"
+#line 323 "parser.y"
     {
 						SlonikStmt_try *new;
 
@@ -1578,7 +1591,7 @@
     break;
 
   case 13:
-#line 338 "parser.y"
+#line 341 "parser.y"
     {
 						SlonikStmt_try *new;
 
@@ -1598,7 +1611,7 @@
     break;
 
   case 14:
-#line 356 "parser.y"
+#line 359 "parser.y"
     {
 						SlonikStmt_try *new;
 
@@ -1617,7 +1630,7 @@
     break;
 
   case 15:
-#line 372 "parser.y"
+#line 375 "parser.y"
     {
 						SlonikStmt_try *new;
 
@@ -1635,183 +1648,193 @@
     break;
 
   case 16:
-#line 389 "parser.y"
+#line 392 "parser.y"
     { yyval.statement = yyvsp[-1].statement; }
     break;
 
   case 17:
-#line 392 "parser.y"
+#line 395 "parser.y"
     { yyval.statement = yyvsp[-1].statement; }
     break;
 
   case 18:
-#line 396 "parser.y"
+#line 399 "parser.y"
     { yyval.statement = yyvsp[0].statement; }
     break;
 
   case 19:
-#line 398 "parser.y"
+#line 401 "parser.y"
     { yyvsp[-1].statement->next = yyvsp[0].statement; yyval.statement = yyvsp[-1].statement; }
     break;
 
   case 20:
-#line 402 "parser.y"
+#line 405 "parser.y"
     { yyval.statement = yyvsp[0].statement; }
     break;
 
   case 21:
-#line 404 "parser.y"
+#line 407 "parser.y"
     { yyval.statement = yyvsp[0].statement; }
     break;
 
   case 22:
-#line 406 "parser.y"
+#line 409 "parser.y"
     { yyval.statement = yyvsp[0].statement; }
     break;
 
   case 23:
-#line 408 "parser.y"
+#line 411 "parser.y"
     { yyval.statement = yyvsp[0].statement; }
     break;
 
   case 24:
-#line 410 "parser.y"
+#line 413 "parser.y"
     { yyval.statement = yyvsp[0].statement; }
     break;
 
   case 25:
-#line 412 "parser.y"
+#line 415 "parser.y"
     { yyval.statement = yyvsp[0].statement; }
     break;
 
   case 26:
-#line 414 "parser.y"
+#line 417 "parser.y"
     { yyval.statement = yyvsp[0].statement; }
     break;
 
   case 27:
-#line 416 "parser.y"
+#line 419 "parser.y"
     { yyval.statement = yyvsp[0].statement; }
     break;
 
   case 28:
-#line 418 "parser.y"
+#line 421 "parser.y"
     { yyval.statement = yyvsp[0].statement; }
     break;
 
   case 29:
-#line 420 "parser.y"
+#line 423 "parser.y"
     { yyval.statement = yyvsp[0].statement; }
     break;
 
   case 30:
-#line 422 "parser.y"
+#line 425 "parser.y"
     { yyval.statement = yyvsp[0].statement; }
     break;
 
   case 31:
-#line 424 "parser.y"
+#line 427 "parser.y"
     { yyval.statement = yyvsp[0].statement; }
     break;
 
   case 32:
-#line 426 "parser.y"
+#line 429 "parser.y"
     { yyval.statement = yyvsp[0].statement; }
     break;
 
   case 33:
-#line 428 "parser.y"
+#line 431 "parser.y"
     { yyval.statement = yyvsp[0].statement; }
     break;
 
   case 34:
-#line 430 "parser.y"
+#line 433 "parser.y"
     { yyval.statement = yyvsp[0].statement; }
     break;
 
   case 35:
-#line 432 "parser.y"
+#line 435 "parser.y"
     { yyval.statement = yyvsp[0].statement; }
     break;
 
   case 36:
-#line 434 "parser.y"
+#line 437 "parser.y"
     { yyval.statement = yyvsp[0].statement; }
     break;
 
   case 37:
-#line 436 "parser.y"
+#line 439 "parser.y"
     { yyval.statement = yyvsp[0].statement; }
     break;
 
   case 38:
-#line 438 "parser.y"
+#line 441 "parser.y"
     { yyval.statement = yyvsp[0].statement; }
     break;
 
   case 39:
-#line 440 "parser.y"
+#line 443 "parser.y"
     { yyval.statement = yyvsp[0].statement; }
     break;
 
   case 40:
-#line 442 "parser.y"
+#line 445 "parser.y"
     { yyval.statement = yyvsp[0].statement; }
     break;
 
   case 41:
-#line 444 "parser.y"
+#line 447 "parser.y"
     { yyval.statement = yyvsp[0].statement; }
     break;
 
   case 42:
-#line 446 "parser.y"
+#line 449 "parser.y"
     { yyval.statement = yyvsp[0].statement; }
     break;
 
   case 43:
-#line 448 "parser.y"
+#line 451 "parser.y"
     { yyval.statement = yyvsp[0].statement; }
     break;
 
   case 44:
-#line 450 "parser.y"
+#line 453 "parser.y"
     { yyval.statement = yyvsp[0].statement; }
     break;
 
   case 45:
-#line 452 "parser.y"
+#line 455 "parser.y"
     { yyval.statement = yyvsp[0].statement; }
     break;
 
   case 46:
-#line 454 "parser.y"
+#line 457 "parser.y"
     { yyval.statement = yyvsp[0].statement; }
     break;
 
   case 47:
-#line 456 "parser.y"
+#line 459 "parser.y"
     { yyval.statement = yyvsp[0].statement; }
     break;
 
   case 48:
-#line 458 "parser.y"
+#line 461 "parser.y"
     { yyval.statement = yyvsp[0].statement; }
     break;
 
   case 49:
-#line 460 "parser.y"
+#line 463 "parser.y"
     { yyval.statement = yyvsp[0].statement; }
     break;
 
   case 50:
-#line 462 "parser.y"
-    { yyerrok;
-						  yyval.statement = yyvsp[-1].statement; }
+#line 465 "parser.y"
+    { yyval.statement = yyvsp[0].statement; }
     break;
 
   case 51:
 #line 467 "parser.y"
+    { yyval.statement = yyvsp[0].statement; }
+    break;
+
+  case 52:
+#line 469 "parser.y"
+    { yyerrok;
+						  yyval.statement = yyvsp[-1].statement; }
+    break;
+
+  case 53:
+#line 474 "parser.y"
     {
 						SlonikStmt_echo *new;
 
@@ -1828,8 +1851,8 @@
 					}
     break;
 
-  case 52:
-#line 484 "parser.y"
+  case 54:
+#line 491 "parser.y"
     {
 						SlonikStmt_exit *new;
 
@@ -1846,8 +1869,8 @@
 					}
     break;
 
-  case 53:
-#line 501 "parser.y"
+  case 55:
+#line 508 "parser.y"
     {
 						SlonikStmt_restart_node *new;
 
@@ -1864,18 +1887,18 @@
 					}
     break;
 
-  case 54:
-#line 518 "parser.y"
+  case 56:
+#line 525 "parser.y"
     { yyval.ival = strtol(yytext, NULL, 10); }
     break;
 
-  case 55:
-#line 520 "parser.y"
+  case 57:
+#line 527 "parser.y"
     { yyval.ival = -yyvsp[0].ival; }
     break;
 
-  case 56:
-#line 524 "parser.y"
+  case 58:
+#line 531 "parser.y"
     {
 						SlonikStmt *new;
 
@@ -1890,8 +1913,8 @@
 					}
     break;
 
-  case 57:
-#line 539 "parser.y"
+  case 59:
+#line 546 "parser.y"
     {
 						SlonikStmt_init_cluster *new;
 						statement_option opt[] = {
@@ -1919,8 +1942,8 @@
 					}
     break;
 
-  case 58:
-#line 567 "parser.y"
+  case 60:
+#line 574 "parser.y"
     {
 						SlonikStmt_store_node *new;
 						statement_option opt[] = {
@@ -1950,8 +1973,8 @@
 					}
     break;
 
-  case 59:
-#line 597 "parser.y"
+  case 61:
+#line 604 "parser.y"
     {
 						SlonikStmt_drop_node *new;
 						statement_option opt[] = {
@@ -1979,8 +2002,8 @@
 					}
     break;
 
-  case 60:
-#line 625 "parser.y"
+  case 62:
+#line 632 "parser.y"
     {
 						SlonikStmt_failed_node *new;
 						statement_option opt[] = {
@@ -2008,8 +2031,8 @@
 					}
     break;
 
-  case 61:
-#line 653 "parser.y"
+  case 63:
+#line 660 "parser.y"
     {
 						SlonikStmt_uninstall_node *new;
 						statement_option opt[] = {
@@ -2035,8 +2058,8 @@
 					}
     break;
 
-  case 62:
-#line 679 "parser.y"
+  case 64:
+#line 686 "parser.y"
     {
 						SlonikStmt_store_path *new;
 						statement_option opt[] = {
@@ -2068,8 +2091,8 @@
 					}
     break;
 
-  case 63:
-#line 711 "parser.y"
+  case 65:
+#line 718 "parser.y"
     {
 						SlonikStmt_drop_path *new;
 						statement_option opt[] = {
@@ -2099,8 +2122,8 @@
 					}
     break;
 
-  case 64:
-#line 741 "parser.y"
+  case 66:
+#line 748 "parser.y"
     {
 						SlonikStmt_store_listen *new;
 						statement_option opt[] = {
@@ -2130,8 +2153,8 @@
 					}
     break;
 
-  case 65:
-#line 771 "parser.y"
+  case 67:
+#line 778 "parser.y"
     {
 						SlonikStmt_drop_listen *new;
 						statement_option opt[] = {
@@ -2161,8 +2184,8 @@
 					}
     break;
 
-  case 66:
-#line 801 "parser.y"
+  case 68:
+#line 808 "parser.y"
     {
 						SlonikStmt_create_set *new;
 						statement_option opt[] = {
@@ -2192,8 +2215,8 @@
 					}
     break;
 
-  case 67:
-#line 831 "parser.y"
+  case 69:
+#line 838 "parser.y"
     {
 						SlonikStmt_drop_set *new;
 						statement_option opt[] = {
@@ -2221,8 +2244,8 @@
 					}
     break;
 
-  case 68:
-#line 859 "parser.y"
+  case 70:
+#line 866 "parser.y"
     {
 						SlonikStmt_merge_set *new;
 						statement_option opt[] = {
@@ -2252,8 +2275,8 @@
 					}
     break;
 
-  case 69:
-#line 889 "parser.y"
+  case 71:
+#line 896 "parser.y"
     {
 						SlonikStmt_table_add_key *new;
 						statement_option opt[] = {
@@ -2281,8 +2304,8 @@
 					}
     break;
 
-  case 70:
-#line 917 "parser.y"
+  case 72:
+#line 924 "parser.y"
     {
 						SlonikStmt_set_add_table *new;
 						statement_option opt[] = {
@@ -2320,8 +2343,8 @@
 					}
     break;
 
-  case 71:
-#line 955 "parser.y"
+  case 73:
+#line 962 "parser.y"
     {
 						SlonikStmt_set_add_sequence *new;
 						statement_option opt[] = {
@@ -2355,8 +2378,8 @@
 					}
     break;
 
-  case 72:
-#line 989 "parser.y"
+  case 74:
+#line 996 "parser.y"
     {
 						SlonikStmt_set_drop_table *new;
 						statement_option opt[] = {
@@ -2382,8 +2405,8 @@
 					}
     break;
 
-  case 73:
-#line 1015 "parser.y"
+  case 75:
+#line 1022 "parser.y"
     {
 						SlonikStmt_set_drop_sequence *new;
 						statement_option opt[] = {
@@ -2411,8 +2434,68 @@
 					}
     break;
 
-  case 74:
-#line 1043 "parser.y"
+  case 76:
+#line 1050 "parser.y"
+    {
+						SlonikStmt_set_move_table *new;
+						statement_option opt[] = {
+							STMT_OPTION_INT( O_ORIGIN, -1 ),
+							STMT_OPTION_INT( O_ID, -1 ),
+							STMT_OPTION_INT( O_NEW_SET, -1 ),
+							STMT_OPTION_END
+						};
+						new = (SlonikStmt_set_move_table *)
+							malloc(sizeof(SlonikStmt_set_move_table));
+						memset(new, 0, sizeof(SlonikStmt_set_move_table));
+						new->hdr.stmt_type		= STMT_SET_MOVE_TABLE;
+						new->hdr.stmt_filename	= current_file;
+						new->hdr.stmt_lno		= yyvsp[-4].ival;
+
+						if (assign_options(opt, yyvsp[0].opt_list) == 0) {
+							new->set_origin		= opt[0].ival;
+							new->tab_id			= opt[1].ival;
+							new->new_set_id		= opt[2].ival;
+						}
+						else
+							parser_errors++;
+
+						yyval.statement = (SlonikStmt *)new;
+					}
+    break;
+
+  case 77:
+#line 1078 "parser.y"
+    {
+						SlonikStmt_set_move_sequence *new;
+						statement_option opt[] = {
+							STMT_OPTION_INT( O_ORIGIN, -1 ),
+							STMT_OPTION_INT( O_ID, -1 ),
+							STMT_OPTION_INT( O_NEW_SET, -1 ),
+							STMT_OPTION_END
+						};
+
+						new = (SlonikStmt_set_move_sequence *)
+								malloc(sizeof(SlonikStmt_set_move_sequence));
+						memset(new, 0, sizeof(SlonikStmt_set_move_sequence));
+						new->hdr.stmt_type		= STMT_SET_MOVE_SEQUENCE;
+						new->hdr.stmt_filename	= current_file;
+						new->hdr.stmt_lno		= yyvsp[-4].ival;
+
+						if (assign_options(opt, yyvsp[0].opt_list) == 0)
+						{
+							new->set_origin		= opt[0].ival;
+							new->seq_id			= opt[1].ival;
+							new->new_set_id		= opt[2].ival;
+						}
+						else
+							parser_errors++;
+
+						yyval.statement = (SlonikStmt *)new;
+					}
+    break;
+
+  case 78:
+#line 1108 "parser.y"
     {
 						SlonikStmt_store_trigger *new;
 						statement_option opt[] = {
@@ -2442,8 +2525,8 @@
 					}
     break;
 
-  case 75:
-#line 1073 "parser.y"
+  case 79:
+#line 1138 "parser.y"
     {
 						SlonikStmt_drop_trigger *new;
 						statement_option opt[] = {
@@ -2473,8 +2556,8 @@
 					}
     break;
 
-  case 76:
-#line 1103 "parser.y"
+  case 80:
+#line 1168 "parser.y"
     {
 						SlonikStmt_subscribe_set *new;
 						statement_option opt[] = {
@@ -2506,8 +2589,8 @@
 					}
     break;
 
-  case 77:
-#line 1135 "parser.y"
+  case 81:
+#line 1200 "parser.y"
     {
 						SlonikStmt_unsubscribe_set *new;
 						statement_option opt[] = {
@@ -2535,8 +2618,8 @@
 					}
     break;
 
-  case 78:
-#line 1163 "parser.y"
+  case 82:
+#line 1228 "parser.y"
     {
 						SlonikStmt_lock_set *new;
 						statement_option opt[] = {
@@ -2564,8 +2647,8 @@
 					}
     break;
 
-  case 79:
-#line 1191 "parser.y"
+  case 83:
+#line 1256 "parser.y"
     {
 						SlonikStmt_unlock_set *new;
 						statement_option opt[] = {
@@ -2593,8 +2676,8 @@
 					}
     break;
 
-  case 80:
-#line 1219 "parser.y"
+  case 84:
+#line 1284 "parser.y"
     {
 						SlonikStmt_move_set *new;
 						statement_option opt[] = {
@@ -2624,8 +2707,8 @@
 					}
     break;
 
-  case 81:
-#line 1249 "parser.y"
+  case 85:
+#line 1314 "parser.y"
     {
 						SlonikStmt_ddl_script *new;
 						statement_option opt[] = {
@@ -2656,8 +2739,8 @@
 					}
     break;
 
-  case 82:
-#line 1280 "parser.y"
+  case 86:
+#line 1345 "parser.y"
     {
 						SlonikStmt_update_functions *new;
 						statement_option opt[] = {
@@ -2683,8 +2766,8 @@
 					}
     break;
 
-  case 83:
-#line 1306 "parser.y"
+  case 87:
+#line 1371 "parser.y"
     {
 						SlonikStmt_wait_event *new;
 						statement_option opt[] = {
@@ -2716,188 +2799,196 @@
 					}
     break;
 
-  case 84:
-#line 1338 "parser.y"
+  case 88:
+#line 1403 "parser.y"
     { yyval.opt_list = NULL; }
     break;
 
-  case 85:
-#line 1340 "parser.y"
+  case 89:
+#line 1405 "parser.y"
     { yyval.opt_list = yyvsp[-2].opt_list; }
     break;
 
-  case 86:
-#line 1344 "parser.y"
+  case 90:
+#line 1409 "parser.y"
     { yyval.opt_list = yyvsp[0].opt_list; }
     break;
 
-  case 87:
-#line 1346 "parser.y"
+  case 91:
+#line 1411 "parser.y"
     { yyvsp[-2].opt_list->next = yyvsp[0].opt_list; yyval.opt_list = yyvsp[-2].opt_list; }
     break;
 
-  case 88:
-#line 1350 "parser.y"
+  case 92:
+#line 1415 "parser.y"
     {
 						yyvsp[0].opt_list->opt_code	= O_ID;
 						yyval.opt_list = yyvsp[0].opt_list;
 					}
     break;
 
-  case 89:
-#line 1355 "parser.y"
+  case 93:
+#line 1420 "parser.y"
     {
 						yyvsp[0].opt_list->opt_code	= O_BACKUP_NODE;
 						yyval.opt_list = yyvsp[0].opt_list;
 					}
     break;
 
-  case 90:
-#line 1360 "parser.y"
+  case 94:
+#line 1425 "parser.y"
     {
 						yyvsp[0].opt_list->opt_code	= O_EVENT_NODE;
 						yyval.opt_list = yyvsp[0].opt_list;
 					}
     break;
 
-  case 91:
-#line 1365 "parser.y"
+  case 95:
+#line 1430 "parser.y"
     {
 						yyvsp[0].opt_list->opt_code	= O_SERVER;
 						yyval.opt_list = yyvsp[0].opt_list;
 					}
     break;
 
-  case 92:
-#line 1370 "parser.y"
+  case 96:
+#line 1435 "parser.y"
     {
 						yyvsp[0].opt_list->opt_code	= O_CLIENT;
 						yyval.opt_list = yyvsp[0].opt_list;
 					}
     break;
 
-  case 93:
-#line 1375 "parser.y"
+  case 97:
+#line 1440 "parser.y"
     {
 						yyvsp[0].opt_list->opt_code	= O_ORIGIN;
 						yyval.opt_list = yyvsp[0].opt_list;
 					}
     break;
 
-  case 94:
-#line 1380 "parser.y"
+  case 98:
+#line 1445 "parser.y"
     {
 						yyvsp[0].opt_list->opt_code	= O_OLD_ORIGIN;
 						yyval.opt_list = yyvsp[0].opt_list;
 					}
     break;
 
-  case 95:
-#line 1385 "parser.y"
+  case 99:
+#line 1450 "parser.y"
     {
 						yyvsp[0].opt_list->opt_code	= O_NEW_ORIGIN;
 						yyval.opt_list = yyvsp[0].opt_list;
 					}
     break;
 
-  case 96:
-#line 1390 "parser.y"
+  case 100:
+#line 1455 "parser.y"
+    {
+						yyvsp[0].opt_list->opt_code	= O_NEW_SET;
+						yyval.opt_list = yyvsp[0].opt_list;
+					}
+    break;
+
+  case 101:
+#line 1460 "parser.y"
     {
 						yyvsp[0].opt_list->opt_code	= O_RECEIVER;
 						yyval.opt_list = yyvsp[0].opt_list;
 					}
     break;
 
-  case 97:
-#line 1395 "parser.y"
+  case 102:
+#line 1465 "parser.y"
     {
 						yyvsp[0].opt_list->opt_code	= O_PROVIDER;
 						yyval.opt_list = yyvsp[0].opt_list;
 					}
     break;
 
-  case 98:
-#line 1400 "parser.y"
+  case 103:
+#line 1470 "parser.y"
     {
 						yyvsp[0].opt_list->opt_code	= O_CONNRETRY;
 						yyval.opt_list = yyvsp[0].opt_list;
 					}
     break;
 
-  case 99:
-#line 1405 "parser.y"
+  case 104:
+#line 1475 "parser.y"
     {
 						yyvsp[0].opt_list->opt_code	= O_COMMENT;
 						yyval.opt_list = yyvsp[0].opt_list;
 					}
     break;
 
-  case 100:
-#line 1410 "parser.y"
+  case 105:
+#line 1480 "parser.y"
     {
 						yyvsp[0].opt_list->opt_code	= O_CONNINFO;
 						yyval.opt_list = yyvsp[0].opt_list;
 					}
     break;
 
-  case 101:
-#line 1415 "parser.y"
+  case 106:
+#line 1485 "parser.y"
     {
 						yyvsp[0].opt_list->opt_code	= O_SET_ID;
 						yyval.opt_list = yyvsp[0].opt_list;
 					}
     break;
 
-  case 102:
-#line 1420 "parser.y"
+  case 107:
+#line 1490 "parser.y"
     {
 						yyvsp[0].opt_list->opt_code	= O_ADD_ID;
 						yyval.opt_list = yyvsp[0].opt_list;
 					}
     break;
 
-  case 103:
-#line 1425 "parser.y"
+  case 108:
+#line 1495 "parser.y"
     {
 						yyvsp[0].opt_list->opt_code	= O_NODE_ID;
 						yyval.opt_list = yyvsp[0].opt_list;
 					}
     break;
 
-  case 104:
-#line 1430 "parser.y"
+  case 109:
+#line 1500 "parser.y"
     {
 						yyvsp[0].opt_list->opt_code	= O_TAB_ID;
 						yyval.opt_list = yyvsp[0].opt_list;
 					}
     break;
 
-  case 105:
-#line 1435 "parser.y"
+  case 110:
+#line 1505 "parser.y"
     {
 						yyvsp[0].opt_list->opt_code	= O_TRIG_NAME;
 						yyval.opt_list = yyvsp[0].opt_list;
 					}
     break;
 
-  case 106:
-#line 1440 "parser.y"
+  case 111:
+#line 1510 "parser.y"
     {
 						yyvsp[0].opt_list->opt_code	= O_FQNAME;
 						yyval.opt_list = yyvsp[0].opt_list;
 					}
     break;
 
-  case 107:
-#line 1445 "parser.y"
+  case 112:
+#line 1515 "parser.y"
     {
 						yyvsp[0].opt_list->opt_code	= O_USE_KEY;
 						yyval.opt_list = yyvsp[0].opt_list;
 					}
     break;
 
-  case 108:
-#line 1450 "parser.y"
+  case 113:
+#line 1520 "parser.y"
     {
 						option_list *new;
 						new = (option_list *)malloc(sizeof(option_list));
@@ -2912,24 +3003,24 @@
 					}
     break;
 
-  case 109:
-#line 1463 "parser.y"
+  case 114:
+#line 1533 "parser.y"
     {
 						yyvsp[0].opt_list->opt_code	= O_FORWARD;
 						yyval.opt_list = yyvsp[0].opt_list;
 					}
     break;
 
-  case 110:
-#line 1468 "parser.y"
+  case 115:
+#line 1538 "parser.y"
     {
 						yyvsp[0].opt_list->opt_code	= O_FILENAME;
 						yyval.opt_list = yyvsp[0].opt_list;
 					}
     break;
 
-  case 111:
-#line 1473 "parser.y"
+  case 116:
+#line 1543 "parser.y"
     {
 						option_list *new;
 						new = (option_list *)malloc(sizeof(option_list));
@@ -2944,16 +3035,16 @@
 					}
     break;
 
-  case 112:
-#line 1486 "parser.y"
+  case 117:
+#line 1556 "parser.y"
     {
 						yyvsp[0].opt_list->opt_code	= O_WAIT_CONFIRMED;
 						yyval.opt_list = yyvsp[0].opt_list;
 					}
     break;
 
-  case 113:
-#line 1491 "parser.y"
+  case 118:
+#line 1561 "parser.y"
     {
 						option_list *new;
 						new = (option_list *)malloc(sizeof(option_list));
@@ -2968,24 +3059,24 @@
 					}
     break;
 
-  case 114:
-#line 1504 "parser.y"
+  case 119:
+#line 1574 "parser.y"
     {
 						yyvsp[0].opt_list->opt_code	= O_WAIT_ON;
 						yyval.opt_list = yyvsp[0].opt_list;
 					}
     break;
 
-  case 115:
-#line 1509 "parser.y"
+  case 120:
+#line 1579 "parser.y"
     {
 						yyvsp[0].opt_list->opt_code	= O_TIMEOUT;
 						yyval.opt_list = yyvsp[0].opt_list;
 					}
     break;
 
-  case 116:
-#line 1516 "parser.y"
+  case 121:
+#line 1586 "parser.y"
     {
 						option_list *new;
 						new = (option_list *)malloc(sizeof(option_list));
@@ -2999,8 +3090,8 @@
 					}
     break;
 
-  case 117:
-#line 1530 "parser.y"
+  case 122:
+#line 1600 "parser.y"
     {
 						option_list *new;
 						new = (option_list *)malloc(sizeof(option_list));
@@ -3014,8 +3105,8 @@
 					}
     break;
 
-  case 118:
-#line 1544 "parser.y"
+  case 123:
+#line 1614 "parser.y"
     {
 						option_list *new;
 						new = (option_list *)malloc(sizeof(option_list));
@@ -3029,8 +3120,8 @@
 					}
     break;
 
-  case 119:
-#line 1556 "parser.y"
+  case 124:
+#line 1626 "parser.y"
     {
 						option_list *new;
 						new = (option_list *)malloc(sizeof(option_list));
@@ -3044,15 +3135,15 @@
 					}
     break;
 
-  case 126:
-#line 1580 "parser.y"
+  case 131:
+#line 1650 "parser.y"
     {
 						yyval.ival = strtol(yytext, NULL, 10);
 					}
     break;
 
-  case 127:
-#line 1586 "parser.y"
+  case 132:
+#line 1656 "parser.y"
     {
 						char   *ret;
 
@@ -3064,8 +3155,8 @@
 					}
     break;
 
-  case 128:
-#line 1598 "parser.y"
+  case 133:
+#line 1668 "parser.y"
     {
 						char   *ret;
 
@@ -3077,8 +3168,8 @@
 					}
     break;
 
-  case 129:
-#line 1610 "parser.y"
+  case 134:
+#line 1680 "parser.y"
     { yyval.ival = yylineno; }
     break;
 
@@ -3086,7 +3177,7 @@
     }
 
 /* Line 991 of yacc.c.  */
-#line 3089 "y.tab.c"
+#line 3180 "y.tab.c"
 
   yyvsp -= yylen;
   yyssp -= yylen;
@@ -3295,7 +3386,7 @@
 }
 
 
-#line 1613 "parser.y"
+#line 1683 "parser.y"
 
 
 
@@ -3322,6 +3413,7 @@
 		case O_FQNAME:			return "full qualified name";
 		case O_ID:				return "id";
 		case O_NEW_ORIGIN:		return "new origin";
+		case O_NEW_SET:			return "new set";
 		case O_NODE_ID:			return "node id";
 		case O_OLD_ORIGIN:		return "old origin";
 		case O_ORIGIN:			return "origin";


More information about the Slony1-commit mailing list