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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Remove a couple of useless pstrdup() calls.
Дата
Msg-id E1adsDn-0002Qf-72@gemulon.postgresql.org
обсуждение исходный текст
Список 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(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: pgsql: Avoid unlikely data-loss scenarios due to rename() without fsync
Следующее
От: Robert Haas
Дата:
Сообщение: pgsql: Code review for b6fb6471f6afaf649e52f38269fd8c5c60647669.