Currently the function create_remotedml_plan special cases CMD_INSERT while planning and does not use GetRelationNodes. There should be a central place in code to provide exec_nodes.
If we do not special case CMD_INSERT we get the following diffs in insets.sql and plpgsql.sql
--- src/test/regress/results/inherit.out 2013-02-22 11:54:32.968582044 +0500
+++ /home/edb/Desktop/QS/latest_code/patch_changed/regress/results/inherit.out 2013-02-22 11:04:48.000000000 +0500
@@ -1254,10 +1254,7 @@
select * from patest0 join (select f1 from int4_tbl limit 1) ss on id = f1;
id | x | f1
----+---+----
- 0 | 0 | 0
- 0 | 0 | 0
- 0 | 0 | 0
-(3 rows)
+(0 rows)
drop index patest2i;
explain (costs off, num_nodes off, nodes off)
--- src/test/regress/results/plpgsql.out 2013-02-22 11:56:11.701418954 +0500
+++ /home/edb/Desktop/QS/latest_code/patch_changed/regress/results/plpgsql.out 2013-02-22 11:06:27.000000000 +0500
@@ -2161,7 +2161,11 @@
select trap_foreign_key(2); -- detects FK violation
NOTICE: caught foreign_key_violation
-ERROR: failed to send COMMIT command to node
+ trap_foreign_key
+------------------
+ 0
+(1 row)
+
begin;
set constraints all deferred;
select trap_foreign_key(2); -- should not detect FK violation