Fix compiler warning on MSVC

MSVC does not understand that ereport(ERROR) does not return, so just
return the first enum PartitionStrategy value to keep the compiler from
complaining about the missing return.

Discussion: https://postgr.es/m/20221104161934.GB16921@telsasoft.com
This commit is contained in:
David Rowley 2022-11-08 10:54:04 +13:00
parent 0e758ae89a
commit 1613de8bc3
1 changed files with 3 additions and 0 deletions

View File

@ -18428,10 +18428,13 @@ parsePartitionStrategy(char *strategy)
return PARTITION_STRATEGY_RANGE;
else if (pg_strcasecmp(strategy, "hash") == 0)
return PARTITION_STRATEGY_HASH;
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("unrecognized partitioning strategy \"%s\"",
strategy)));
return PARTITION_STRATEGY_LIST; /* keep compiler quiet */
}
/*