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

From momjian@postgresql.org (Bruce Momjian)
Subject pgsql: Allow psql multi-line column values to align in the proper
Date
Msg-id 20060210003904.06F199DC9A8@postgresql.org
Whole thread Raw
Responses 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>)
List 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 by date:

Previous
From: dfetter@pgfoundry.org (User Dfetter)
Date:
Subject: dbi-link - dbi-link: Roadmap...
Next
From: momjian@postgresql.org (Bruce Momjian)
Date:
Subject: pgsql: Done: < o Allow multi-line column values to align in the proper