postgresql/src/backend/optimizer/path
David Rowley c23e3e6beb Use list_copy_head() instead of list_truncate(list_copy(...), ...)
Truncating off the end of a freshly copied List is not a very efficient
way of copying the first N elements of a List.

In many of the cases that are updated here, the pattern was only being
used to remove the final element of a List.  That's about the best case
for it, but there were many instances where the truncate trimming the List
down much further.

4cc832f94 added list_copy_head(), so let's use it in cases where it's
useful.

Author: David Rowley
Discussion: https://postgr.es/m/1986787.1657666922%40sss.pgh.pa.us
2022-07-13 15:03:47 +12:00
..
Makefile Split all OBJS style lines in makefiles into one-line-per-entry style. 2019-11-05 14:41:07 -08:00
allpaths.c Use list_copy_head() instead of list_truncate(list_copy(...), ...) 2022-07-13 15:03:47 +12:00
clausesel.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
costsize.c Avoid overflow hazard when clamping group counts to "long int". 2022-05-21 13:13:44 -04:00
equivclass.c Pre-beta mechanical code beautification. 2022-05-12 15:17:30 -04:00
indxpath.c Use list_copy_head() instead of list_truncate(list_copy(...), ...) 2022-07-13 15:03:47 +12:00
joinpath.c Fix incorrect row estimates used for Memoize costing 2022-05-16 16:07:56 +12:00
joinrels.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
pathkeys.c Use list_copy_head() instead of list_truncate(list_copy(...), ...) 2022-07-13 15:03:47 +12:00
tidpath.c Update copyright for 2022 2022-01-07 19:04:57 -05:00