- use resultRelationRelids instead of resultRelations for PG 19
- fix "unannotated fall-through between switch labels"
- fix "function declaration isn’t a prototype"
- pass VacuumParams as pointer (per Since upstream commit
771fe0948ca)
Marina Polyakova, Anton Voloshin
{
TableList *tl[] = {&includeTables, &excludeTables};
int i;
{
TableList *tl[] = {&includeTables, &excludeTables};
int i;
#if PG_VERSION_NUM < 120000
flags,
#endif
#if PG_VERSION_NUM < 120000
flags,
#endif
-#if PG_VERSION_NUM >= 190000
- vacstmt,
-#else
NULL, true, GetAccessStrategy(BAS_VACUUM)
#endif
);
NULL, true, GetAccessStrategy(BAS_VACUUM)
#endif
);
case CK_INSERT:
case CK_UPDATE:
rstat->n_tuples += naffected;
case CK_INSERT:
case CK_UPDATE:
rstat->n_tuples += naffected;
+#if PG_VERSION_NUM >= 190000
+ pg_fallthrough;
+#endif
/* FALLTHROUGH */
case CK_DELETE:
rstat->rereadStat = (reltype == OATT_PERSISTENT);
/* FALLTHROUGH */
case CK_DELETE:
rstat->rereadStat = (reltype == OATT_PERSISTENT);
+#if PG_VERSION_NUM >= 190000
+ if (!bms_is_empty(queryDesc->plannedstmt->resultRelationRelids) &&
+#else
if (queryDesc->plannedstmt->resultRelations &&
if (queryDesc->plannedstmt->resultRelations &&
queryDesc->plannedstmt->rtable)
{
queryDesc->plannedstmt->rtable)
{
+#if PG_VERSION_NUM >= 190000
+ int n = -1;
+
+ while ((n = bms_next_member(queryDesc->plannedstmt->resultRelationRelids, n)) >= 0)
+ {
+#else
ListCell *l;
foreach(l, queryDesc->plannedstmt->resultRelations)
{
int n = lfirst_int(l);
ListCell *l;
foreach(l, queryDesc->plannedstmt->resultRelations)
{
int n = lfirst_int(l);
RangeTblEntry *rte = list_nth(queryDesc->plannedstmt->rtable, n-1);
if (rte->rtekind == RTE_RELATION)
RangeTblEntry *rte = list_nth(queryDesc->plannedstmt->rtable, n-1);
if (rte->rtekind == RTE_RELATION)
break;
case XACT_EVENT_ABORT:
toremove = NIL;
break;
case XACT_EVENT_ABORT:
toremove = NIL;
+#if PG_VERSION_NUM >= 190000
+ pg_fallthrough;
+#endif
+ /* FALLTHROUGH */