postgresql/src
Alvaro Herrera 6710e83a67
Remove useless pstrdups in untransformRelOptions
The two strings are already a single palloc'd chunk, not freed; there's
no reason to allocate separate copies that have the same lifetime.

This code is only called in short-lived memory contexts (except in some
cases in TopTransactionContext, which is still short-lived enough not to
really matter), and typically only for short arrays, so the memory or
computation saved is likely negligible.  However, let's fix it to avoid
leaving a bad example of code to copy.  This is the only place I could
find where we're doing this with makeDefElem().

Reported-by: Junwang Zhao <zhjwpku@gmail.com>
Discussion: https://postgr.es/m/20220909142050.3vv2hjekppk265dd@alvherre.pgsql
2022-09-13 11:59:31 +02:00
..
backend Remove useless pstrdups in untransformRelOptions 2022-09-13 11:59:31 +02:00
bin Move any remaining files generated by pg_upgrade into an internal subdir 2022-09-13 10:38:56 +09:00
common Treat Unicode codepoints of category "Format" as non-spacing 2022-09-13 16:13:33 +07:00
fe_utils Clean up inconsistent use of fflush(). 2022-08-29 13:55:41 -04:00
include Treat Unicode codepoints of category "Format" as non-spacing 2022-09-13 16:13:33 +07:00
interfaces Fix possible omission of variable storage markers in ECPG. 2022-09-09 15:34:04 -04:00
makefiles aix: No need to use mkldexport when we want to export all symbols 2022-09-09 19:11:49 -07:00
pl Bump minimum version of Bison to 2.3 2022-09-09 12:31:41 +07:00
port Cleanup more code and comments related to Windows NT4 (XP days) 2022-08-30 09:52:58 +09:00
template Move darwin sysroot determination into separate file 2022-09-01 16:54:19 -07:00
test Fix NaN comparison in circle_same test 2022-09-12 12:59:06 +02:00
timezone Expand the use of get_dirent_type(), shaving a few calls to stat()/lstat() 2022-09-02 16:58:06 +09:00
tools Adjust header exceptions for 0bd9c6297 2022-09-13 16:57:15 +07:00
tutorial Update copyright for 2022 2022-01-07 19:04:57 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Remove the option to build thread_test.c outside configure. 2020-10-21 12:08:48 -04:00
Makefile.global.in Remove unused configure variable. 2022-08-18 11:22:13 -04:00
Makefile.shlib aix: No need to use mkldexport when we want to export all symbols 2022-09-09 19:11:49 -07:00
nls-global.mk Fix for make unportability 2022-07-13 09:15:01 +02:00