Disable expanded mode only for \d tablename, not for all backslash
commands. Per complaint that \df+ is clearer in expanded mode.
This commit is contained in:
parent
69f16b562a
commit
3332e38189
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$PostgreSQL: pgsql/doc/src/sgml/release.sgml,v 1.394 2005/10/26 19:21:53 tgl Exp $
|
$PostgreSQL: pgsql/doc/src/sgml/release.sgml,v 1.395 2005/10/27 13:34:46 momjian Exp $
|
||||||
|
|
||||||
Typical markup:
|
Typical markup:
|
||||||
|
|
||||||
@ -1700,7 +1700,7 @@ psql -t -f fixseq.sql db1 | psql -e db1
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Prevent <command>\x</> (expanded mode) from affecting
|
Prevent <command>\x</> (expanded mode) from affecting
|
||||||
backslash-command displays (Neil)
|
the output of <command>\d tablename<\> (Neil)
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
|
* 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 "postgres_fe.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
@ -795,8 +795,6 @@ PrintQueryTuples(const PGresult *results)
|
|||||||
{
|
{
|
||||||
printQueryOpt my_popt = pset.popt;
|
printQueryOpt my_popt = pset.popt;
|
||||||
|
|
||||||
my_popt.topt.normal_query = true;
|
|
||||||
|
|
||||||
/* write output to \g argument, if any */
|
/* write output to \g argument, if any */
|
||||||
if (pset.gfname)
|
if (pset.gfname)
|
||||||
{
|
{
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
|
* 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 "postgres_fe.h"
|
||||||
#include "describe.h"
|
#include "describe.h"
|
||||||
@ -703,6 +703,9 @@ describeOneTableDetails(const char *schemaname,
|
|||||||
|
|
||||||
retval = false;
|
retval = false;
|
||||||
|
|
||||||
|
/* This output looks confusing in expanded mode. */
|
||||||
|
myopt.expanded = false;
|
||||||
|
|
||||||
initPQExpBuffer(&buf);
|
initPQExpBuffer(&buf);
|
||||||
initPQExpBuffer(&title);
|
initPQExpBuffer(&title);
|
||||||
initPQExpBuffer(&tmpbuf);
|
initPQExpBuffer(&tmpbuf);
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
|
* 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 "postgres_fe.h"
|
||||||
#include "common.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
|
* normal (user-submitted) query, not a table we're printing for a slash
|
||||||
* command.
|
* command.
|
||||||
*/
|
*/
|
||||||
if (opt->expanded && opt->normal_query)
|
if (opt->expanded)
|
||||||
use_expanded = true;
|
use_expanded = true;
|
||||||
else
|
else
|
||||||
use_expanded = false;
|
use_expanded = false;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
|
* 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
|
#ifndef PRINT_H
|
||||||
#define PRINT_H
|
#define PRINT_H
|
||||||
@ -43,8 +43,6 @@ typedef struct _printTableOpt
|
|||||||
* decimal marker */
|
* decimal marker */
|
||||||
char *tableAttr; /* attributes for HTML <table ...> */
|
char *tableAttr; /* attributes for HTML <table ...> */
|
||||||
int encoding; /* character encoding */
|
int encoding; /* character encoding */
|
||||||
bool normal_query; /* are we presenting the results of a "normal"
|
|
||||||
* query, or a slash command? */
|
|
||||||
} printTableOpt;
|
} printTableOpt;
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
|
* 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"
|
#include "postgres_fe.h"
|
||||||
|
|
||||||
@ -147,7 +147,6 @@ main(int argc, char *argv[])
|
|||||||
pset.queryFout = stdout;
|
pset.queryFout = stdout;
|
||||||
pset.popt.topt.border = 1;
|
pset.popt.topt.border = 1;
|
||||||
pset.popt.topt.pager = 1;
|
pset.popt.topt.pager = 1;
|
||||||
pset.popt.topt.normal_query = false;
|
|
||||||
pset.popt.default_footer = true;
|
pset.popt.default_footer = true;
|
||||||
|
|
||||||
SetVariable(pset.vars, "VERSION", PG_VERSION_STR);
|
SetVariable(pset.vars, "VERSION", PG_VERSION_STR);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user