mirror of
https://github.com/postgres/postgres.git
synced 2025-12-10 14:22:35 +03:00
Have psql output tab as the proper number of spaces, rather than \x09.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (c) 2000-2008, PostgreSQL Global Development Group
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/bin/psql/mbprint.c,v 1.31 2008/05/08 17:04:26 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/bin/psql/mbprint.c,v 1.32 2008/05/08 19:11:36 momjian Exp $
|
||||
*
|
||||
* XXX this file does not really belong in psql/. Perhaps move to libpq?
|
||||
* It also seems that the mbvalidate function is redundant with existing
|
||||
@@ -321,6 +321,14 @@ pg_wcsformat(unsigned char *pwcs, size_t len, int encoding,
|
||||
linewidth += 2;
|
||||
ptr += 2;
|
||||
}
|
||||
else if (*pwcs == '\t') /* Tab */
|
||||
{
|
||||
do
|
||||
{
|
||||
*ptr++ = ' ';
|
||||
linewidth++;
|
||||
} while (linewidth % 8 != 0);
|
||||
}
|
||||
else if (w < 0) /* Other control char */
|
||||
{
|
||||
sprintf((char *) ptr, "\\x%02X", *pwcs);
|
||||
|
||||
Reference in New Issue
Block a user