Re: contrib/pg_freespacemap first check input argument, then relation_open.

2023-07-05 Thread Julien Rouhaud
Hi, On Thu, Jul 06, 2023 at 10:14:46AM +0800, jian he wrote: > > In: > https://git.postgresql.org/cgit/postgresql.git/tree/contrib/pg_freespacemap/pg_freespacemap.c > > rel = relation_open(relid, AccessShareLock); > > if (blkno < 0 || blkno > MaxBlockNumber) > ereport(ERROR, >

contrib/pg_freespacemap first check input argument, then relation_open.

2023-07-05 Thread jian he
Hi. In: https://git.postgresql.org/cgit/postgresql.git/tree/contrib/pg_freespacemap/pg_freespacemap.c rel = relation_open(relid, AccessShareLock); if (blkno < 0 || blkno > MaxBlockNumber) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg("invalid block number")));