1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-24 01:29:19 +03:00

Put back a backwards-compatible version of sampling support functions.

Commit 83e176ec18 removed the longstanding
support functions for block sampling without any consideration of the
impact this would have on third-party FDWs.  The new API is not notably
more functional for FDWs than the old, so forcing them to change doesn't
seem like a good thing.  We can provide the old API as a wrapper (more
or less) around the new one for a minimal amount of extra code.
This commit is contained in:
Tom Lane
2015-05-18 18:34:37 -04:00
parent f5916bb7b5
commit 4db485e75b
3 changed files with 63 additions and 4 deletions

View File

@@ -198,4 +198,9 @@ extern void analyze_rel(Oid relid, RangeVar *relation, int options,
BufferAccessStrategy bstrategy);
extern bool std_typanalyze(VacAttrStats *stats);
/* in utils/misc/sampling.c --- duplicate of declarations in utils/sampling.h */
extern double anl_random_fract(void);
extern double anl_init_selection_state(int n);
extern double anl_get_next_S(double t, int n, double *stateptr);
#endif /* VACUUM_H */