From 2182700e74fdc571e0b9966f2fafad97650ed62a Mon Sep 17 00:00:00 2001 From: Teodor Sigaev Date: Wed, 18 Jan 2023 16:09:49 +0300 Subject: [PATCH] v16 support. Dmitry Koval --- online_analyze.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/online_analyze.c b/online_analyze.c index 5791dd6..afc6b29 100644 --- a/online_analyze.c +++ b/online_analyze.c @@ -191,7 +191,10 @@ tableListAssign(const char * newval, bool doit, TableList *tbl) foreach(l, namelist) { char *curname = (char *) lfirst(l); -#if PG_VERSION_NUM >= 90200 +#if PG_VERSION_NUM >= 160000 + Oid relOid = RangeVarGetRelid(makeRangeVarFromNameList( + stringToQualifiedNameList(curname, NULL)), NoLock, true); +#elif PG_VERSION_NUM >= 90200 Oid relOid = RangeVarGetRelid(makeRangeVarFromNameList( stringToQualifiedNameList(curname)), NoLock, true); #else @@ -795,8 +798,13 @@ onlineAnalyzeHooker(QueryDesc *queryDesc) { Datum tblnamed = constval->constvalue; char *tblname = text_to_cstring(DatumGetTextP(tblnamed)); +#if PG_VERSION_NUM >= 160000 + RangeVar *tblvar = + makeRangeVarFromNameList(stringToQualifiedNameList(tblname, NULL)); +#else RangeVar *tblvar = makeRangeVarFromNameList(stringToQualifiedNameList(tblname)); +#endif makeAnalyze(RangeVarGetRelid(tblvar, NoLock, -- 2.46.1