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:
parent
c0b74323dc
commit
35a015a600
@ -99,11 +99,11 @@ relation_statistics_update(FunctionCallInfo fcinfo, int elevel)
|
|||||||
{
|
{
|
||||||
int32 relpages = PG_GETARG_INT32(RELPAGES_ARG);
|
int32 relpages = PG_GETARG_INT32(RELPAGES_ARG);
|
||||||
|
|
||||||
if (relpages < -1)
|
if (relpages < 0)
|
||||||
{
|
{
|
||||||
ereport(elevel,
|
ereport(elevel,
|
||||||
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
||||||
errmsg("relpages cannot be < -1")));
|
errmsg("relpages cannot be < 0")));
|
||||||
table_close(crel, RowExclusiveLock);
|
table_close(crel, RowExclusiveLock);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user