#include "utils/rel.h"
#include "utils/relcache.h"
#include "utils/timestamp.h"
+#if PG_VERSION_NUM >= 90500
+#include "nodes/makefuncs.h"
+#endif
#endif
#ifdef PG_MODULE_MAGIC
static ProcessUtility_hook_type oldProcessUtilityHook = NULL;
#endif
-typedef enum
+typedef enum
{
OATT_ALL = 0x03,
OATT_PERSISTENT = 0x01,
return false;
}
+#if PG_VERSION_NUM >= 90500
+static RangeVar*
+makeRangeVarFromOid(Oid relOid)
+{
+ return makeRangeVar(
+ get_namespace_name(get_rel_namespace(relOid)),
+ get_rel_name(relOid),
+ -1
+ );
+
+}
+#endif
+
static void
makeAnalyze(Oid relOid, CmdType operation, uint32 naffected)
{
, true
#endif
#else
- NULL /*RangeVar*/, VACOPT_ANALYZE | ((online_analyze_verbose) ? VACOPT_VERBOSE : 0),
+ makeRangeVarFromOid(relOid), VACOPT_ANALYZE | ((online_analyze_verbose) ? VACOPT_VERBOSE : 0),
&vacstmt, NULL, true, GetAccessStrategy(BAS_VACUUM)
#endif
);