postgresql/src/backend
Tom Lane a148f8bc04 Add a planner support function for starts_with().
This fills in some gaps in planner support for starts_with() and
the equivalent ^@ operator:

* A condition such as "textcol ^@ constant" can now use a regular
btree index, not only an SP-GiST index, so long as the index's
collation is C.  (This works just like "textcol LIKE 'foo%'".)

* "starts_with(textcol, constant)" can be optimized the same as
"textcol ^@ constant".

* Fixed-prefix LIKE and regex patterns are now more like starts_with()
in another way: if you apply one to an SPGiST-indexed column, you'll
get an index condition using ^@ rather than two index conditions with
>= and <.

Per a complaint from Shay Rojansky.  Patch by me; thanks to
Nathan Bossart for review.

Discussion: https://postgr.es/m/232599.1633800229@sss.pgh.pa.us
2021-11-17 16:54:12 -05:00
..
access Remove global variable "LastRec" in xlog.c 2021-11-17 11:04:18 +09:00
bootstrap Fix bogus assertion in BootstrapModeMain(). 2021-08-09 08:28:53 -07:00
catalog Improve publication error messages 2021-11-17 14:40:38 +01:00
commands Invalidate relcache when changing REPLICA IDENTITY index. 2021-11-16 08:10:13 +05:30
executor Fix variable lifespan in ExecInitCoerceToDomain(). 2021-11-02 13:36:47 -04:00
foreign Improve HINT message that FDW reports when there are no valid options. 2021-10-27 00:46:52 +09:00
jit Avoid some other O(N^2) hazards in list manipulation. 2021-11-01 16:24:39 -04:00
lib Fix typo in comment 2021-04-20 14:35:16 +02:00
libpq Remove check for accept() argument types 2021-11-09 15:35:26 +01:00
main process startup: Split single user code out of PostgresMain(). 2021-09-17 19:56:47 -07:00
nodes Fix incorrect hash equality operator bug in Memoize 2021-11-08 14:40:33 +13:00
optimizer Fix incorrect hash equality operator bug in Memoize 2021-11-08 14:40:33 +13:00
parser Rename some enums to use TABLE instead of REL. 2021-11-09 08:39:33 +05:30
partitioning Fix duplicate words in comments 2021-10-04 15:12:57 +02:00
po Translation updates 2021-06-21 12:33:50 +02:00
port windows: Remove use of WIN32_LEAN_AND_MEAN from crashdump.c. 2021-11-06 15:43:22 -07:00
postmaster Improve performance of pgarch_readyXlog() with many status files. 2021-11-11 15:20:26 -05:00
regex Make pg_regexec() robust against out-of-range search_start. 2021-09-11 15:19:31 -04:00
replication Fix thinko in bbsink_throttle_manifest_contents. 2021-11-15 14:22:13 -05:00
rewrite Fix rewriter to set hasModifyingCTE correctly on rewritten queries. 2021-09-08 12:05:47 -04:00
snowball Update snowball 2021-02-19 08:10:15 +01:00
statistics Clean up more code using "(expr) ? true : false" 2021-10-11 09:36:42 +09:00
storage Make some comments use the term "ProcSignal" for consistency 2021-11-09 12:56:34 +09:00
tcop Add pg_checkpointer predefined role for CHECKPOINT command. 2021-11-09 16:59:14 -08:00
tsearch Clean up more code using "(expr) ? true : false" 2021-10-11 09:36:42 +09:00
utils Add a planner support function for starts_with(). 2021-11-17 16:54:12 -05:00
.gitignore
Makefile Use sort_template.h for qsort_tuple() and qsort_ssup(). 2021-03-03 17:02:32 +13:00
common.mk Remove PARTIAL_LINKING build mode. 2018-03-30 17:33:04 -07:00
nls.mk Report progress of startup operations that take a long time. 2021-10-25 11:51:57 -04:00