- COPY_OIDLIST_FIELD(indxid);
- COPY_NODE_FIELD(indxqual);
- COPY_NODE_FIELD(indxqualorig);
- /* this can become COPY_NODE_FIELD when intlists are normal objects: */
- {
- List *newstrat = NIL;
- List *tmp;
-
- foreach(tmp, from->indxstrategy)
- {
- newstrat = lappend(newstrat, listCopy(lfirst(tmp)));
- }
- newnode->indxstrategy = newstrat;
- }
- /* this can become COPY_NODE_FIELD when OID lists are normal objects: */
- {
- List *newsubtype = NIL;
- List *tmp;
-
- foreach(tmp, from->indxsubtype)
- {
- newsubtype = lappend(newsubtype, listCopy(lfirst(tmp)));
- }
- newnode->indxsubtype = newsubtype;
- }
- COPY_SCALAR_FIELD(indxorderdir);
+ COPY_SCALAR_FIELD(indexid);
+ COPY_NODE_FIELD(indexqual);
+ COPY_NODE_FIELD(indexqualorig);
+ COPY_NODE_FIELD(indexstrategy);
+ COPY_NODE_FIELD(indexsubtype);
+ COPY_SCALAR_FIELD(indexorderdir);
+
+ return newnode;
+}
+
+/*
+ * _copyBitmapIndexScan
+ */
+static BitmapIndexScan *
+_copyBitmapIndexScan(BitmapIndexScan *from)
+{
+ BitmapIndexScan *newnode = makeNode(BitmapIndexScan);
+
+ /*
+ * copy node superclass fields
+ */
+ CopyScanFields((Scan *) from, (Scan *) newnode);
+
+ /*
+ * copy remainder of node
+ */
+ COPY_SCALAR_FIELD(indexid);
+ COPY_NODE_FIELD(indexqual);
+ COPY_NODE_FIELD(indexqualorig);
+ COPY_NODE_FIELD(indexstrategy);
+ COPY_NODE_FIELD(indexsubtype);
+
+ return newnode;
+}
+
+/*
+ * _copyBitmapHeapScan
+ */
+static BitmapHeapScan *
+_copyBitmapHeapScan(BitmapHeapScan *from)
+{
+ BitmapHeapScan *newnode = makeNode(BitmapHeapScan);
+
+ /*
+ * copy node superclass fields
+ */
+ CopyScanFields((Scan *) from, (Scan *) newnode);
+
+ /*
+ * copy remainder of node
+ */
+ COPY_NODE_FIELD(bitmapqualorig);