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
{
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,