Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 1613de8

Browse files
committed
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
1 parent 0e758ae commit 1613de8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/backend/parser/gram.y

+3
Original file line numberDiff line numberDiff line change
@@ -18428,10 +18428,13 @@ parsePartitionStrategy(char *strategy)
1842818428
return PARTITION_STRATEGY_RANGE;
1842918429
else if (pg_strcasecmp(strategy, "hash") == 0)
1843018430
return PARTITION_STRATEGY_HASH;
18431+
1843118432
ereport(ERROR,
1843218433
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
1843318434
errmsg("unrecognized partitioning strategy \"%s\"",
1843418435
strategy)));
18436+
return PARTITION_STRATEGY_LIST; /* keep compiler quiet */
18437+
1843518438
}
1843618439

1843718440
/*

0 commit comments

Comments
 (0)