diff options
author | Jeff Davis <jdavis@postgresql.org> | 2024-10-13 13:44:23 -0700 |
---|---|---|
committer | Jeff Davis <jdavis@postgresql.org> | 2024-10-13 13:44:23 -0700 |
commit | 35a015a60045c2daa532c7a9545818856f09d57a (patch) | |
tree | caf29b7b85268529da2730ac6e0bd18c8f34f0d8 /src | |
parent | c0b74323dc7b47644f074cf98597723ca55b2309 (diff) | |
download | postgresql-35a015a60045c2daa532c7a9545818856f09d57a.tar.gz postgresql-35a015a60045c2daa532c7a9545818856f09d57a.zip |
Fixup for pg_set_relation_stats().
Reported-by: Noriyoshi Shinoda
Discussion: https://postgr.es/m/DM4PR84MB17345E2DFF28A5557B7CBC3CEE7A2@DM4PR84MB1734.NAMPRD84.PROD.OUTLOOK.COM
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/statistics/relation_stats.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/statistics/relation_stats.c b/src/backend/statistics/relation_stats.c index ffa3d83a878..26f15061e89 100644 --- a/src/backend/statistics/relation_stats.c +++ b/src/backend/statistics/relation_stats.c @@ -99,11 +99,11 @@ relation_statistics_update(FunctionCallInfo fcinfo, int elevel) { int32 relpages = PG_GETARG_INT32(RELPAGES_ARG); - if (relpages < -1) + if (relpages < 0) { ereport(elevel, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("relpages cannot be < -1"))); + errmsg("relpages cannot be < 0"))); table_close(crel, RowExclusiveLock); return false; } |