File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
src/backend/optimizer/plan Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 88 *
99 *
1010 * IDENTIFICATION
11- * $PostgreSQL: pgsql/src/backend/optimizer/plan/initsplan.c,v 1.97 2004/01/05 05:07:35 tgl Exp $
11+ * $PostgreSQL: pgsql/src/backend/optimizer/plan/initsplan.c,v 1.98 2004/02/27 21:42:00 tgl Exp $
1212 *
1313 *-------------------------------------------------------------------------
1414 */
@@ -756,11 +756,16 @@ process_implied_equality(Query *root,
756756 errmsg ("equality operator for types %s and %s should be merge-joinable, but isn't" ,
757757 format_type_be (ltype ), format_type_be (rtype ))));
758758
759+ /*
760+ * Now we can build the new clause. Copy to ensure it shares no
761+ * substructure with original (this is necessary in case there are
762+ * subselects in there...)
763+ */
759764 clause = make_opclause (oprid (eq_operator ), /* opno */
760765 BOOLOID , /* opresulttype */
761766 false, /* opretset */
762- (Expr * ) item1 ,
763- (Expr * ) item2 );
767+ (Expr * ) copyObject ( item1 ) ,
768+ (Expr * ) copyObject ( item2 ) );
764769
765770 ReleaseSysCache (eq_operator );
766771
You can’t perform that action at this time.
0 commit comments