aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2005-10-27 13:34:47 +0000
committerBruce Momjian <bruce@momjian.us>2005-10-27 13:34:47 +0000
commit3332e38189b27b64428db4f0bcd5459800de1cfc (patch)
tree79dce25e92a44802c7709ed2af3e898c9fd28af4 /src
parent69f16b562a9088d708a588333afcf16e84317a4e (diff)
downloadpostgresql-3332e38189b27b64428db4f0bcd5459800de1cfc.tar.gz
postgresql-3332e38189b27b64428db4f0bcd5459800de1cfc.zip
Disable expanded mode only for \d tablename, not for all backslash
commands. Per complaint that \df+ is clearer in expanded mode.
Diffstat (limited to 'src')
-rw-r--r--src/bin/psql/common.c4
-rw-r--r--src/bin/psql/describe.c5
-rw-r--r--src/bin/psql/print.c4
-rw-r--r--src/bin/psql/print.h4
-rw-r--r--src/bin/psql/startup.c3
5 files changed, 9 insertions, 11 deletions
diff --git a/src/bin/psql/common.c b/src/bin/psql/common.c
index 2999c169ef3..1b01a97d885 100644
--- a/src/bin/psql/common.c
+++ b/src/bin/psql/common.c
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/psql/common.c,v 1.108 2005/10/15 02:49:40 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/common.c,v 1.109 2005/10/27 13:34:47 momjian Exp $
*/
#include "postgres_fe.h"
#include "common.h"
@@ -795,8 +795,6 @@ PrintQueryTuples(const PGresult *results)
{
printQueryOpt my_popt = pset.popt;
- my_popt.topt.normal_query = true;
-
/* write output to \g argument, if any */
if (pset.gfname)
{
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index 889014ffeae..aefb6041abc 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.128 2005/10/20 05:15:09 tgl Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.129 2005/10/27 13:34:47 momjian Exp $
*/
#include "postgres_fe.h"
#include "describe.h"
@@ -703,6 +703,9 @@ describeOneTableDetails(const char *schemaname,
retval = false;
+ /* This output looks confusing in expanded mode. */
+ myopt.expanded = false;
+
initPQExpBuffer(&buf);
initPQExpBuffer(&title);
initPQExpBuffer(&tmpbuf);
diff --git a/src/bin/psql/print.c b/src/bin/psql/print.c
index 3d2a1fa1754..65d107acc4c 100644
--- a/src/bin/psql/print.c
+++ b/src/bin/psql/print.c
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.78 2005/10/15 02:49:40 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.79 2005/10/27 13:34:47 momjian Exp $
*/
#include "postgres_fe.h"
#include "common.h"
@@ -1491,7 +1491,7 @@ printTable(const char *title,
* normal (user-submitted) query, not a table we're printing for a slash
* command.
*/
- if (opt->expanded && opt->normal_query)
+ if (opt->expanded)
use_expanded = true;
else
use_expanded = false;
diff --git a/src/bin/psql/print.h b/src/bin/psql/print.h
index 5b07bfd4756..298763533ea 100644
--- a/src/bin/psql/print.h
+++ b/src/bin/psql/print.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/psql/print.h,v 1.29 2005/10/15 02:49:40 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/print.h,v 1.30 2005/10/27 13:34:47 momjian Exp $
*/
#ifndef PRINT_H
#define PRINT_H
@@ -43,8 +43,6 @@ typedef struct _printTableOpt
* decimal marker */
char *tableAttr; /* attributes for HTML <table ...> */
int encoding; /* character encoding */
- bool normal_query; /* are we presenting the results of a "normal"
- * query, or a slash command? */
} printTableOpt;
diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c
index 5d027dd0181..783a472aec8 100644
--- a/src/bin/psql/startup.c
+++ b/src/bin/psql/startup.c
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/psql/startup.c,v 1.125 2005/10/15 02:49:40 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/startup.c,v 1.126 2005/10/27 13:34:47 momjian Exp $
*/
#include "postgres_fe.h"
@@ -147,7 +147,6 @@ main(int argc, char *argv[])
pset.queryFout = stdout;
pset.popt.topt.border = 1;
pset.popt.topt.pager = 1;
- pset.popt.topt.normal_query = false;
pset.popt.default_footer = true;
SetVariable(pset.vars, "VERSION", PG_VERSION_STR);