forked from huawei/openGauss-server
!1258 修复cidr类型的网络地址子网掩码为32时,在函数中调用max时报错
Merge pull request !1258 from 习特铭/master
This commit is contained in:
commit
d71952ae87
|
|
@ -295,7 +295,7 @@ Datum inet_to_cidr(PG_FUNCTION_ARGS)
|
|||
bits = ip_bits(src);
|
||||
|
||||
/* safety check */
|
||||
if ((bits < 0) || (bits >= ip_maxbits(src)))
|
||||
if ((bits < 0) || (bits > ip_maxbits(src)))
|
||||
ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg("invalid inet bit length: %d", bits)));
|
||||
|
||||
/* clone the original data */
|
||||
|
|
|
|||
Loading…
Reference in New Issue