postgresql/src/test/regress
Tom Lane b3c265d7be Fix corner-case failure in match_pattern_prefix().
The planner's optimization code for LIKE and regex operators could
error out with a complaint like "no = operator for opfamily NNN"
if someone created a binary-compatible index (for example, a
bpchar_ops index on a text column) on the LIKE's left argument.

This is a consequence of careless refactoring in commit 74dfe58a5.
The old code in match_special_index_operator only accepted specific
combinations of the pattern operator and the index opclass, thereby
indirectly guaranteeing that the opclass would have a comparison
operator with the same LHS input type as the pattern operator.
While moving the logic out to a planner support function, I simplified
that test in a way that no longer guarantees that.  Really though we'd
like an altogether weaker dependency on the opclass, so rather than
put back exactly the old code, just allow lookup failure.  I have in
mind now to rewrite this logic completely, but this is the minimum
change needed to fix the bug in v12.

Per report from Manuel Rigger.  Back-patch to v12 where the mistake
came in.

Discussion: https://postgr.es/m/CA+u7OA7nnGYy8rY0vdTe811NuA+Frr9nbcBO9u2Z+JxqNaud+g@mail.gmail.com
2019-11-19 17:03:34 -05:00
..
data
expected Fix corner-case failure in match_pattern_prefix(). 2019-11-19 17:03:34 -05:00
input Improve psql's \d output for partitioned indexes. 2019-07-23 17:04:21 -04:00
output Improve psql's \d output for partitioned indexes. 2019-07-23 17:04:21 -04:00
sql Fix corner-case failure in match_pattern_prefix(). 2019-11-19 17:03:34 -05:00
.gitignore Fix inconsistencies and typos in the tree, take 10 2019-08-13 13:53:41 +09:00
GNUmakefile Move logging.h and logging.c from src/fe_utils/ to src/common/. 2019-05-14 14:20:10 -04:00
Makefile
parallel_schedule Add tests for tuplesort.c. 2019-11-13 15:52:13 -08:00
pg_regress_main.c tableam: introduce table AM infrastructure. 2019-03-06 09:54:38 -08:00
pg_regress.c On Windows, use COMSPEC to find the location of cmd.exe. 2019-10-28 14:15:03 -04:00
pg_regress.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
README
regress.c Make the order of the header file includes consistent in non-backend modules. 2019-10-25 07:41:52 +05:30
regressplans.sh Fix inconsistencies in the code 2019-07-08 13:15:09 +09:00
resultmap Cygwin and Mingw floating-point fixes. 2019-02-16 01:50:16 +00:00
serial_schedule Add tuplesort test to serial_schedule. 2019-11-16 10:51:03 -08:00
standby_schedule

Documentation concerning how to run these regression tests and interpret
the results can be found in the PostgreSQL manual, in the chapter
"Regression Tests".