1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Remove local optimizations of empty Bitmapsets into null pointers.

These are all dead code now that it's done centrally.

Patch by me; thanks to Nathan Bossart and Richard Guo for review.

Discussion: https://postgr.es/m/1159933.1677621588@sss.pgh.pa.us
This commit is contained in:
Tom Lane
2023-03-02 12:01:47 -05:00
parent 00b41463c2
commit 6b661b01f4
9 changed files with 9 additions and 64 deletions

View File

@ -6240,12 +6240,9 @@ setup_param_list(PLpgSQL_execstate *estate, PLpgSQL_expr *expr)
Assert(expr->plan != NULL);
/*
* We only need a ParamListInfo if the expression has parameters. In
* principle we should test with bms_is_empty(), but we use a not-null
* test because it's faster. In current usage bits are never removed from
* expr->paramnos, only added, so this test is correct anyway.
* We only need a ParamListInfo if the expression has parameters.
*/
if (expr->paramnos)
if (!bms_is_empty(expr->paramnos))
{
/* Use the common ParamListInfo */
paramLI = estate->paramLI;