1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-05 07:21:24 +03:00

Remove the wrong assertion from match_orclause_to_indexcol()

Obviously, the constant could be zero.  Also, add the relevant check to
regression tests.

Reported-by: Richard Guo
Discussion: https://postgr.es/m/CAMbWs4-siKJdtWhcbqk4Y-xG12do2Ckm1qw672GNsSnDqL9FQg%40mail.gmail.com
This commit is contained in:
Alexander Korotkov
2024-11-25 09:05:26 +02:00
parent d05a387d9d
commit d4d11940df
3 changed files with 8 additions and 8 deletions

View File

@ -3430,7 +3430,7 @@ match_orclause_to_indexcol(PlannerInfo *root,
elems = (Datum *) palloc(sizeof(Datum) * list_length(consts));
foreach_node(Const, value, consts)
{
Assert(!value->constisnull && value->constvalue);
Assert(!value->constisnull);
elems[i++] = value->constvalue;
}