fix.diff

text/plain

Filename: fix.diff
Type: text/plain
Part: 0
Message: Re: POC, WIP: OR-clause support for indexes

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: unified
File+
src/backend/optimizer/path/indxpath.c 4 4
diff --git a/src/backend/optimizer/path/indxpath.c b/src/backend/optimizer/path/indxpath.c
index 56b04541db..1545876e2f 100644
--- a/src/backend/optimizer/path/indxpath.c
+++ b/src/backend/optimizer/path/indxpath.c
@@ -1284,7 +1284,7 @@ build_paths_for_SAOP(PlannerInfo *root, RelOptInfo *rel, RestrictInfo *rinfo,
 		ArrayType		   *arrayval = NULL;
 		ArrayExpr		   *arr = NULL;
 		Const			   *arrayconst = lsecond_node(Const, saop->args);
-		ScalarArrayOpExpr  *dest = makeNode(ScalarArrayOpExpr);
+		ScalarArrayOpExpr	dest;
 
 		pd = (PredicatesData *) lfirst(lc);
 		if (pd->elems == NIL)
@@ -1302,10 +1302,10 @@ build_paths_for_SAOP(PlannerInfo *root, RelOptInfo *rel, RestrictInfo *rinfo,
 		arr->multidims = false;
 
 		/* Compose new SAOP, partially covering the source one */
-		memcpy(dest, saop, sizeof(ScalarArrayOpExpr));
-		dest->args = list_make2(linitial(saop->args), arr);
+		memcpy(&dest, saop, sizeof(ScalarArrayOpExpr));
+		dest.args = list_make2(linitial(saop->args), arr);
 
-		clause = (Expr *) estimate_expression_value(root, (Node *) dest);
+		clause = (Expr *) estimate_expression_value(root, (Node *) &dest);
 
 		/*
 		 * Create new RestrictInfo. It maybe more heavy than just copy node,