OSDN Git Service

Simplify psql's new linestyle behavior to default to linestyle=ascii all
[pg-rex/syncrep.git] / src / bin / psql / print.c
index b7fdc47..6c21c16 100644 (file)
@@ -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;
 }