postgresql/src/backend
Tom Lane 3fe2fc6bbd Fix handling of bare boolean expressions in mcv_get_match_bitmap.
Since v14, the extended stats machinery will try to estimate for
otherwise-unsupported boolean expressions if they match an expression
available from an extended stats object.  mcv.c did not get the memo
about this, and would spit up with "unknown clause type".  Fortunately
the case is easy to handle, since we can expect the expression yields
boolean.

While here, replace some not-terribly-on-point assertions with
simpler runtime tests for lookup failure.  That seems appropriate
so that we get an elog not a crash if we somehow get to the new
it-should-be-a-bool-expression code with a subexpression that
doesn't match any stats column.

Per report from Danny Shemesh.  Thanks to Justin Pryzby for
preliminary investigation.

Discussion: https://postgr.es/m/CAFZC=QqD6=27wQPOW1pbRa98KPyuyn+7cL_Ay_Ck-roZV84vHg@mail.gmail.com
2022-08-05 15:00:03 -04:00
..
access BRIN: mask BRIN_EVACUATE_PAGE for WAL consistency checking 2022-08-05 18:00:17 +02:00
bootstrap Rethink definition of pg_attribute.attcompression. 2021-05-27 13:24:27 -04:00
catalog Fix omissions in support for the "regcollation" type. 2022-07-17 17:43:28 -04:00
commands Fix ENABLE/DISABLE TRIGGER to handle recursion correctly 2022-08-05 09:47:11 +02:00
executor Add CHECK_FOR_INTERRUPTS in ExecInsert's speculative insertion loop. 2022-08-04 14:10:06 -04:00
foreign Update copyright for 2021 2021-01-02 13:06:25 -05:00
jit Back-patch LLVM 14 API changes. 2022-03-16 11:42:00 +13:00
lib Fix lock assertions in dshash.c. 2022-07-11 15:47:12 +12:00
libpq Remove misguided SSL key file ownership check in libpq. 2022-05-26 14:14:05 -04:00
main Update copyright for 2021 2021-01-02 13:06:25 -05:00
nodes Fix ENABLE/DISABLE TRIGGER to handle recursion correctly 2022-08-05 09:47:11 +02:00
optimizer Fix incorrect tests for SRFs in relation_can_be_sorted_early(). 2022-08-03 17:33:42 -04:00
parser Check maximum number of columns in function RTEs, too. 2022-08-01 12:22:35 -04:00
partitioning Avoid using ambiguous word "non-negative" in error messages. 2021-07-28 01:21:35 +09:00
po Translation updates 2022-06-13 07:32:39 +02:00
port Reject huge_pages=on if shared_memory_type=sysv. 2021-10-26 13:09:00 +13:00
postmaster Wake up for latches in CheckpointWriteDelay(). 2022-03-16 13:57:07 +13:00
regex Make pg_regexec() robust against out-of-range search_start. 2021-09-11 15:19:43 -04:00
replication Prevent BASE_BACKUP in the middle of another backup in the same session. 2022-07-20 09:52:11 +09:00
rewrite Fix incautious CTE matching in rewriteSearchAndCycle(). 2022-04-23 12:16:12 -04:00
snowball Update snowball 2021-02-19 08:10:15 +01:00
statistics Fix handling of bare boolean expressions in mcv_get_match_bitmap. 2022-08-05 15:00:03 -04:00
storage Add HINT for restartpoint race with KeepFileRestoredFromArchive(). 2022-08-05 08:30:58 -07:00
tcop Force immediate commit after CREATE DATABASE etc in extended protocol. 2022-07-26 13:07:03 -04:00
tsearch Invent qsort_interruptible(). 2022-07-12 16:30:36 -04:00
utils Fix trim_array() for zero-dimensional array argument. 2022-07-31 13:43:17 -04:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Remove PARTIAL_LINKING build mode. 2018-03-30 17:33:04 -07:00
Makefile Use sort_template.h for qsort_tuple() and qsort_ssup(). 2021-03-03 17:02:32 +13:00
nls.mk Translation updates 2021-09-20 16:23:13 +02:00