Browse files

Merge branch 'master' of ssh://postgres-xc.git.sourceforge.net/gitroo…

…t/postgres-xc/postgres-xc
  • Loading branch information...
2 parents 12bce7a + d6c3f65 commit 667ce0824d0bcb7acbc128d747b131d78d4ed73e @koichi-szk koichi-szk committed Mar 26, 2012
Showing with 12 additions and 4 deletions.
  1. +11 −2 src/backend/pgxc/plan/planner.c
  2. +1 −2 src/test/regress/sql/rowtypes.sql
View
13 src/backend/pgxc/plan/planner.c
@@ -1757,7 +1757,6 @@ pgxc_FQS_walker(Node *node, FQS_context *fqs_context)
* do we handle DDLs here?
*/
case T_FieldSelect:
- case T_FieldStore:
case T_ArrayRef:
case T_RangeTblRef:
case T_NamedArgExpr:
@@ -1782,14 +1781,24 @@ pgxc_FQS_walker(Node *node, FQS_context *fqs_context)
case T_CoerceToDomain:
break;
+ case T_FieldStore:
+ /*
+ * PostgreSQL deparsing logic does not handle the FieldStore
+ * for more than one fields (see processIndirection()). So, let's
+ * handle it through standard planner, where whole row will be
+ * constructed.
+ */
+ fqs_context->fqsc_canShip = false;
+ break;
+
case T_SetToDefault:
/*
* PGXCTODO: we should actually check whether the default value to
* be substituted is shippable to the datanode. Some cases like
* nextval() of a sequence can not be shipped to the datanode, hence
* for now default values can not be shipped to the datanodes
*/
- fqs_context->fqsc_need_coord = true;
+ fqs_context->fqsc_canShip = false;
break;
case T_Var:
View
3 src/test/regress/sql/rowtypes.sql
@@ -58,8 +58,7 @@ update people set fn.suffix = 'Jr';
select * from people;
---- PGXCTODO: This test case makes a server crash due to query deparsing in planner
---- insert into quadtable (f1, q.c1.r, q.c2.i) values(44,55,66);
+insert into quadtable (f1, q.c1.r, q.c2.i) values(44,55,66);
select * from quadtable order by f1, q;

0 comments on commit 667ce08

Please sign in to comment.