diff options
author | David Rowley <drowley@postgresql.org> | 2022-11-08 10:54:04 +1300 |
---|---|---|
committer | David Rowley <drowley@postgresql.org> | 2022-11-08 10:54:04 +1300 |
commit | 1613de8bc34b4977d0186b56ef5a00ef8058a74a (patch) | |
tree | f3d863e48a2fec1035e55975e74a87bb266a058b /src | |
parent | 0e758ae89a20f233bb1c20a0f52ac7c81b2ef1b8 (diff) | |
download | postgresql-1613de8bc34b4977d0186b56ef5a00ef8058a74a.tar.gz postgresql-1613de8bc34b4977d0186b56ef5a00ef8058a74a.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/parser/gram.y | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index deb101710e4..2dddd8f302c 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -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 */ + } /* |