postgresql/src
Nathan Bossart b14b1eb4da Teach convert() and friends to avoid copying when possible.
Presently, pg_convert() allocates a new bytea and copies the result
regardless of whether any conversion actually happened.  This
commit adjusts this function to return the source pointer as-is if
no conversion occurred.  This optimization isn't expected to make a
tremendous difference, but it still seems worthwhile to avoid
unnecessary memory allocations.

Author: Yurii Rashkovskii
Reviewed-by: Bertrand Drouvot
Discussion: https://postgr.es/m/CA%2BRLCQyknBPSWXRBQGOi6aYEcdQ9RpH9Kch4GjoeY8dQ3D%2Bvhw%40mail.gmail.com
2023-12-04 11:55:18 -06:00
..
backend Teach convert() and friends to avoid copying when possible. 2023-12-04 11:55:18 -06:00
bin Don't use pgbench -j in tests 2023-12-04 14:00:51 +01:00
common Add CHECK_FOR_INTERRUPTS() in scram_SaltedPassword() for the backend 2023-11-28 08:35:50 +09:00
fe_utils Remove unneeded assignments in for loop header 2023-11-21 16:10:27 +01:00
include Remove now-unnecessary Autovacuum[Launcher|Worker]IAm functions 2023-12-04 15:34:37 +02:00
interfaces Use BIO_{get,set}_app_data instead of BIO_{get,set}_data. 2023-11-28 12:34:03 -05:00
makefiles Remove distprep 2023-11-06 15:18:04 +01:00
pl Don't specify number of dimensions in cases where we don't know it. 2023-11-17 11:29:46 -05:00
port Optimize pg_readv/pg_pwritev single vector case. 2023-11-29 17:19:25 +13:00
template Use unnamed POSIX semaphores on Cygwin. 2023-01-06 10:33:28 +13:00
test Add support for REINDEX in event triggers 2023-12-04 09:53:49 +09:00
timezone Remove distprep 2023-11-06 15:18:04 +01:00
tools Read include/exclude commands for dump/restore from file 2023-11-29 14:56:24 +01:00
tutorial Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
.gitignore
DEVELOPERS
Makefile Remove distprep 2023-11-06 15:18:04 +01:00
Makefile.global.in Remove distprep 2023-11-06 15:18:04 +01:00
Makefile.shlib Stop using "-multiply_defined suppress" on macOS. 2023-09-26 21:06:21 -04:00
meson.build Integrate pg_bsd_indent into our build/test infrastructure. 2023-02-12 12:22:21 -05:00
nls-global.mk Remove distprep 2023-11-06 15:18:04 +01:00