]> granicus.if.org Git - postgresql/blobdiff - src/backend/executor/nodeSamplescan.c
Make some small planner API cleanups.
[postgresql] / src / backend / executor / nodeSamplescan.c
index cfa26535d7b42b985c99f0cd90f44ccf4588ed3f..da4a65fd30ad99b65027ece482844f62f8b0ec91 100644 (file)
@@ -3,7 +3,7 @@
  * nodeSamplescan.c
  *       Support routines for sample scans of relations (table sampling).
  *
- * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  *
@@ -15,6 +15,7 @@
 #include "postgres.h"
 
 #include "access/hash.h"
+#include "access/heapam.h"
 #include "access/relscan.h"
 #include "access/tsmapi.h"
 #include "executor/executor.h"
@@ -24,7 +25,6 @@
 #include "storage/predicate.h"
 #include "utils/builtins.h"
 #include "utils/rel.h"
-#include "utils/tqual.h"
 
 static TupleTableSlot *SampleNext(SampleScanState *node);
 static void tablesample_init(SampleScanState *scanstate);
@@ -146,7 +146,8 @@ ExecInitSampleScan(SampleScan *node, EState *estate, int eflags)
 
        /* and create slot with appropriate rowtype */
        ExecInitScanTupleSlot(estate, &scanstate->ss,
-                                                 RelationGetDescr(scanstate->ss.ss_currentRelation));
+                                                 RelationGetDescr(scanstate->ss.ss_currentRelation),
+                                                 &TTSOpsBufferHeapTuple);
 
        /*
         * Initialize result type and projection.