mirror of
https://github.com/postgres/postgres.git
synced 2025-06-30 21:42:05 +03:00
Fixup for pg_set_relation_stats().
Reported-by: Noriyoshi Shinoda Discussion: https://postgr.es/m/DM4PR84MB17345E2DFF28A5557B7CBC3CEE7A2@DM4PR84MB1734.NAMPRD84.PROD.OUTLOOK.COM
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user