Remove the wrong assertion from match_orclause_to_indexcol()
authorAlexander Korotkov <akorotkov@postgresql.org>
Mon, 25 Nov 2024 07:05:26 +0000 (09:05 +0200)
committerAlexander Korotkov <akorotkov@postgresql.org>
Mon, 25 Nov 2024 07:07:30 +0000 (09:07 +0200)
commitd4d11940df94ee13166dda70271ff3b97e43bc9b
treee356b807cf7df8ff93562199cc37f8048b1a6bb8
parentd05a387d9d78a65db2c960d4f309a2649d183066
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
src/backend/optimizer/path/indxpath.c
src/test/regress/expected/create_index.out
src/test/regress/sql/create_index.sql