pgsql: Remove a couple of useless pstrdup() calls.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Remove a couple of useless pstrdup() calls.
Date: 2016-03-10 04:29:11
Message-ID: E1adsDn-0002Qf-72@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Remove a couple of useless pstrdup() calls.

There's no point in pstrdup'ing the result of TextDatumGetCString,
since that's necessarily already a freshly-palloc'd C string.

These particular calls are unlikely to be of any consequence
performance-wise, but still they're a bad precedent that can confuse
future patch authors.

Noted by Chapman Flack.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/cc402116ca156babcd3ef941317f462a96277e3a

Modified Files
--------------
src/backend/foreign/foreign.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2016-03-10 11:13:50 pgsql: Code review for b6fb6471f6afaf649e52f38269fd8c5c60647669.
Previous Message Andres Freund 2016-03-10 03:25:21 pgsql: Introduce durable_rename() and durable_link_or_rename().