pgsql-server/ oc/TODO rc/bin/psql/command.c

Поиск
Список
Период
Сортировка
От momjian@postgresql.org (Bruce Momjian - CVS)
Тема pgsql-server/ oc/TODO rc/bin/psql/command.c
Дата
Msg-id 20020814054922.792964765EA@postgresql.org
обсуждение исходный текст
Список pgsql-committers
CVSROOT:    /cvsroot
Module name:    pgsql-server
Changes by:    momjian@postgresql.org    02/08/14 01:49:22

Modified files:
    doc            : TODO
    src/bin/psql   : command.c

Log message:
    I guess I'd vote for changing the code to be

    sys = malloc(strlen(editorName) + strlen(fname) + 10 + 1);
    if (!sys)
    return false;
    sprintf(sys, "exec '%s' '%s'", editorName, fname);

    (note the added quotes to provide a little protection against spaces
    and such).  Then it's perfectly obvious what the calculation is doing.
    I don't care about wasting 20-some bytes, but confusing readers of the
    code is worth avoiding.

    regards, tom lane


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

Предыдущее
От: ishii@postgresql.org (Tatsuo Ishii)
Дата:
Сообщение: pgsql-server/src/backend/utils/mb mbutils.c
Следующее
От: Gerhard Hintermayer
Дата:
Сообщение: Re: [INTERFACES] libpgtcl modifications