pgsql: Improve coding of column-name parsing in psql's new crosstabview

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Improve coding of column-name parsing in psql's new crosstabview
Дата
Msg-id E1aq1Yc-0001q8-H8@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Improve coding of column-name parsing in psql's new crosstabview.c.

Coverity complained about this code, not without reason because it was
rather messy.  Adjust it to not scribble on the passed string; that adds
one malloc/free cycle per column name, which is going to be insignificant
in context.  We can actually const-ify both the string argument and the
PGresult.

Daniel Verité, with some further cleanup by me

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/7a5f8b5c59033ac153963f98b9109be9529a824a

Modified Files
--------------
src/bin/psql/crosstabview.c | 64 +++++++++++++++++++++++++++------------------
src/bin/psql/crosstabview.h |  3 ++-
2 files changed, 40 insertions(+), 27 deletions(-)


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

Предыдущее
От: Kevin Grittner
Дата:
Сообщение: pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold <
Следующее
От: Andres Freund
Дата:
Сообщение: Re: pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold <