mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Simplify psql's new linestyle behavior to default to linestyle=ascii all
the time, rather than hoping we can tell whether the terminal supports UTF8 characters. Per discussion.
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (c) 2000-2009, PostgreSQL Global Development Group
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.118 2009/11/22 05:20:41 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.119 2009/11/25 20:26:31 tgl Exp $
|
||||
*/
|
||||
#include "postgres_fe.h"
|
||||
|
||||
@ -2550,10 +2550,13 @@ setDecimalLocale(void)
|
||||
const printTextFormat *
|
||||
get_line_style(const printTableOpt *opt)
|
||||
{
|
||||
/*
|
||||
* Note: this function mainly exists to preserve the convention that
|
||||
* a printTableOpt struct can be initialized to zeroes to get default
|
||||
* behavior.
|
||||
*/
|
||||
if (opt->line_style != NULL)
|
||||
return opt->line_style;
|
||||
else if (opt->encoding == pg_get_utf8_id())
|
||||
return &pg_utf8format;
|
||||
else
|
||||
return &pg_asciiformat;
|
||||
}
|
||||
|
Reference in New Issue
Block a user