aboutsummaryrefslogtreecommitdiff
path: root/src/include/access/heapam.h
diff options
context:
space:
mode:
authorSimon Riggs <simon@2ndQuadrant.com>2015-05-15 14:37:10 -0400
committerSimon Riggs <simon@2ndQuadrant.com>2015-05-15 14:37:10 -0400
commitf6d208d6e51810c73f0e02c477984a6b44627f11 (patch)
tree99d540d0b7bda73ff60479f15444f554403d4679 /src/include/access/heapam.h
parent11a83bbedd73800db70f6f2af5a8eb10d15d39d7 (diff)
downloadpostgresql-f6d208d6e51810c73f0e02c477984a6b44627f11.tar.gz
postgresql-f6d208d6e51810c73f0e02c477984a6b44627f11.zip
TABLESAMPLE, SQL Standard and extensible
Add a TABLESAMPLE clause to SELECT statements that allows user to specify random BERNOULLI sampling or block level SYSTEM sampling. Implementation allows for extensible sampling functions to be written, using a standard API. Basic version follows SQLStandard exactly. Usable concrete use cases for the sampling API follow in later commits. Petr Jelinek Reviewed by Michael Paquier and Simon Riggs
Diffstat (limited to 'src/include/access/heapam.h')
-rw-r--r--src/include/access/heapam.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h
index 49c8ca4d66e..eec7c95b218 100644
--- a/src/include/access/heapam.h
+++ b/src/include/access/heapam.h
@@ -114,8 +114,12 @@ extern HeapScanDesc heap_beginscan_strat(Relation relation, Snapshot snapshot,
bool allow_strat, bool allow_sync);
extern HeapScanDesc heap_beginscan_bm(Relation relation, Snapshot snapshot,
int nkeys, ScanKey key);
+extern HeapScanDesc heap_beginscan_sampling(Relation relation,
+ Snapshot snapshot, int nkeys, ScanKey key,
+ bool allow_strat, bool allow_pagemode);
extern void heap_setscanlimits(HeapScanDesc scan, BlockNumber startBlk,
BlockNumber endBlk);
+extern void heapgetpage(HeapScanDesc scan, BlockNumber page);
extern void heap_rescan(HeapScanDesc scan, ScanKey key);
extern void heap_endscan(HeapScanDesc scan);
extern HeapTuple heap_getnext(HeapScanDesc scan, ScanDirection direction);