analyzeutils.h 1.1 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
/*-------------------------------------------------------------------------
 *
 * analyzeutils.h
 *
 *	  Header file for utils functions in analyzeutils.c
 *
 * Copyright (c) 2015, Pivotal Inc.
 *
 *-------------------------------------------------------------------------
 */

#ifndef ANALYZEUTILS_H
#define ANALYZEUTILS_H

#include "commands/vacuum.h"

/* extern functions called by commands/analyze.c */
extern int aggregate_leaf_partition_MCVs(Oid relationOid,
										 AttrNumber attnum,
										 HeapTuple *heaptupleStats,
										 float4 *relTuples,
										 unsigned int nEntries,
										 void **result);
extern bool datumCompare(Datum d1, Datum d2, Oid opFuncOid);
extern float4 get_rel_reltuples(Oid relid);
extern int aggregate_leaf_partition_histograms(Oid relationOid,
											   AttrNumber attnum,
											   HeapTuple *heaptupleStats,
											   float4 *relTuples,
											   unsigned int nEntries,
											   void **result);
extern bool needs_sample(VacAttrStats **vacattrstats, int attr_cnt);
extern bool leaf_parts_analyzed(VacAttrStats *stats);

#endif  /* ANALYZEUTILS_H */