summaryrefslogtreecommitdiff
path: root/src/include/foreign
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2012-04-06 16:04:10 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2012-04-06 16:04:10 -0400
commitcea49fe82fedcf125eb99a780099eaf47a326b03 (patch)
tree37312e107b898d1dc4668f52bf2eb9876f18fbce /src/include/foreign
parent263d9de66b867b7800fac82c222e004b795b724a (diff)
downloadpostgresql-cea49fe82fedcf125eb99a780099eaf47a326b03.tar.gz
Dept of second thoughts: improve the API for AnalyzeForeignTable.
If we make the initially-called function return the table physical-size estimate, acquire_inherited_sample_rows will be able to use that to allocate numbers of samples among child tables, when the day comes that we want to support foreign tables in inheritance trees.
Diffstat (limited to 'src/include/foreign')
-rw-r--r--src/include/foreign/fdwapi.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/include/foreign/fdwapi.h b/src/include/foreign/fdwapi.h
index 6bf3a5e230..0a09c94932 100644
--- a/src/include/foreign/fdwapi.h
+++ b/src/include/foreign/fdwapi.h
@@ -53,11 +53,11 @@ typedef void (*EndForeignScan_function) (ForeignScanState *node);
typedef int (*AcquireSampleRowsFunc) (Relation relation, int elevel,
HeapTuple *rows, int targrows,
double *totalrows,
- double *totaldeadrows,
- BlockNumber *totalpages);
-
-typedef AcquireSampleRowsFunc (*AnalyzeForeignTable_function) (Relation relation);
+ double *totaldeadrows);
+typedef bool (*AnalyzeForeignTable_function) (Relation relation,
+ AcquireSampleRowsFunc *func,
+ BlockNumber *totalpages);
/*
* FdwRoutine is the struct returned by a foreign-data wrapper's handler