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

From: momjian(at)postgresql(dot)org (Bruce Momjian)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Allow psql multi-line column values to align in the proper
Date: 2006-02-10 00:39:04
Message-ID: 20060210003904.06F199DC9A8@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-patches

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)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2006-02-10 04:14:17 pgsql: Done: < o Allow multi-line column values to align in the proper
Previous Message User Dfetter 2006-02-09 23:25:33 dbi-link - dbi-link: Roadmap...

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2006-02-10 04:12:23 Re: contrib/xinetops for 8.1 "patch"
Previous Message Bruce Momjian 2006-02-10 00:38:53 Re: [PATCH] psql formatting patch (round 2)