v16 support. Dmitry Koval
authorTeodor Sigaev <teodor@sigaev.ru>
Wed, 18 Jan 2023 13:09:49 +0000 (16:09 +0300)
committerTeodor Sigaev <teodor@sigaev.ru>
Wed, 18 Jan 2023 13:10:09 +0000 (16:10 +0300)
online_analyze.c

index 5791dd6..afc6b29 100644 (file)
@@ -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,