pgsql: Allow psql multi-line column values to align in the proper

Поиск
Список
Период
Сортировка
От momjian@postgresql.org (Bruce Momjian)
Тема pgsql: Allow psql multi-line column values to align in the proper
Дата
Msg-id 20060210003904.06F199DC9A8@postgresql.org
обсуждение исходный текст
Ответы Re: pgsql: Allow psql multi-line column values to align  (Kris Jurka <books@ejurka.com>)
Re: pgsql: Allow psql multi-line column values to align  (Kris Jurka <books@ejurka.com>)
Список pgsql-committers
Log Message:
-----------
Allow psql multi-line column values to align in the proper columns

  If the second output column value is 'a\nb', the 'b' should appear
  in the second display column, rather than the first column as it
  does now.

Change libpq's PQdsplen() to return more useful values.

> Note: this changes the PQdsplen function, it can now return zero or
> minus one which was not possible before. It doesn't appear anyone is
> actually using the functions other than psql but it is a change. The
> functions are not actually documentated anywhere so it's not like we're
> breaking a defined interface. The new semantics follow the Unicode
> standard.

BACKWARD COMPATIBLE CHANGE.

The only user-visible change I saw in the regression tests is that a
SELECT * on a table where all the columns have been dropped doesn't
return a blank line like before.  This seems like a step forward.

Martijn van Oosterhout

Modified Files:
--------------
    pgsql/src/backend/utils/mb:
        wchar.c (r1.52 -> r1.53)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/mb/wchar.c.diff?r1=1.52&r2=1.53)
    pgsql/src/bin/psql:
        mbprint.c (r1.18 -> r1.19)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/bin/psql/mbprint.c.diff?r1=1.18&r2=1.19)
        mbprint.h (r1.8 -> r1.9)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/bin/psql/mbprint.h.diff?r1=1.8&r2=1.9)
        print.c (r1.79 -> r1.80)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/bin/psql/print.c.diff?r1=1.79&r2=1.80)
    pgsql/src/test/regress/expected:
        alter_table.out (r1.89 -> r1.90)

(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/alter_table.out.diff?r1=1.89&r2=1.90)
        prepare.out (r1.8 -> r1.9)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/prepare.out.diff?r1=1.8&r2=1.9)

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

Предыдущее
От: dfetter@pgfoundry.org (User Dfetter)
Дата:
Сообщение: dbi-link - dbi-link: Roadmap...
Следующее
От: momjian@postgresql.org (Bruce Momjian)
Дата:
Сообщение: pgsql: Done: < o Allow multi-line column values to align in the proper