summaryrefslogtreecommitdiff
path: root/src/backend/catalog/pg_subscription.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2017-04-14 12:54:09 -0400
committerPeter Eisentraut <peter_e@gmx.net>2017-04-14 12:54:09 -0400
commit25371a72b95aab43b0a3547ead4d3286c1128351 (patch)
treed4cb3fe6443160a730539932ea80a401416d0782 /src/backend/catalog/pg_subscription.c
parent0c22327f269eb3bec25327b0e620bdca082e4628 (diff)
downloadpostgresql-25371a72b95aab43b0a3547ead4d3286c1128351.tar.gz
Remove pstrdup of TextDatumGetCString
The result of TextDatumGetCString is already palloc'ed.
Diffstat (limited to 'src/backend/catalog/pg_subscription.c')
-rw-r--r--src/backend/catalog/pg_subscription.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/catalog/pg_subscription.c b/src/backend/catalog/pg_subscription.c
index f5ba9f6d13..7e38b1a31c 100644
--- a/src/backend/catalog/pg_subscription.c
+++ b/src/backend/catalog/pg_subscription.c
@@ -75,7 +75,7 @@ GetSubscription(Oid subid, bool missing_ok)
Anum_pg_subscription_subconninfo,
&isnull);
Assert(!isnull);
- sub->conninfo = pstrdup(TextDatumGetCString(datum));
+ sub->conninfo = TextDatumGetCString(datum);
/* Get slotname */
datum = SysCacheGetAttr(SUBSCRIPTIONOID,
@@ -207,7 +207,7 @@ textarray_to_stringlist(ArrayType *textarray)
return NIL;
for (i = 0; i < nelems; i++)
- res = lappend(res, makeString(pstrdup(TextDatumGetCString(elems[i]))));
+ res = lappend(res, makeString(TextDatumGetCString(elems[i])));
return res;
}