aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2022-09-13 11:59:31 +0200
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2022-09-13 11:59:31 +0200
commit6710e83a675eda798544fea4cdcb89eef7f39403 (patch)
treeff761a3e84b641c25665995248b27192af388fd5 /src/backend/tcop/postgres.c
parentfcf7b3a9d42c3cf778dab0fc644f11f12684d184 (diff)
downloadpostgresql-6710e83a675eda798544fea4cdcb89eef7f39403.tar.gz
postgresql-6710e83a675eda798544fea4cdcb89eef7f39403.zip
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
Diffstat (limited to 'src/backend/tcop/postgres.c')
0 files changed, 0 insertions, 0 deletions