@@ -466,7 +466,7 @@ foreign_expr_walker(Node *node,
466
466
* If function's input collation is not derived from a foreign
467
467
* Var, it can't be sent to remote.
468
468
*/
469
- if (fe -> inputcollid == InvalidOid )
469
+ if (fe -> inputcollid == InvalidOid || inner_cxt . state == FDW_COLLATE_NONE )
470
470
/* OK, inputs are all noncollatable */ ;
471
471
else if (inner_cxt .state != FDW_COLLATE_SAFE ||
472
472
fe -> inputcollid != inner_cxt .collation )
@@ -514,7 +514,7 @@ foreign_expr_walker(Node *node,
514
514
* If operator's input collation is not derived from a foreign
515
515
* Var, it can't be sent to remote.
516
516
*/
517
- if (oe -> inputcollid == InvalidOid )
517
+ if (oe -> inputcollid == InvalidOid || inner_cxt . state == FDW_COLLATE_NONE )
518
518
/* OK, inputs are all noncollatable */ ;
519
519
else if (inner_cxt .state != FDW_COLLATE_SAFE ||
520
520
oe -> inputcollid != inner_cxt .collation )
@@ -554,7 +554,7 @@ foreign_expr_walker(Node *node,
554
554
* If operator's input collation is not derived from a foreign
555
555
* Var, it can't be sent to remote.
556
556
*/
557
- if (oe -> inputcollid == InvalidOid )
557
+ if (oe -> inputcollid == InvalidOid || inner_cxt . state == FDW_COLLATE_NONE )
558
558
/* OK, inputs are all noncollatable */ ;
559
559
else if (inner_cxt .state != FDW_COLLATE_SAFE ||
560
560
oe -> inputcollid != inner_cxt .collation )
0 commit comments