Hi,
Per Coverity.
Perhaps it is excessive caution.
Probably assertion check has already caught all possible errors.
But, redundancy may not cost as much and is worth it.
1.Assertion check
/* Caller messed up if we have neither a ready query nor held data. */
Assert(queryDesc || portal->holdStore);
But in release, if QueryDesc is NULL and portal->holdStore is NULL too,
when Call PushActiveSnapshot deference NULL check can happen.
2. if (portal->atEnd || count <= 0) is True
No need to recheck count against FETCH_ALL.
Is it worth correcting them?
regards,
Ranier Vilela