Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3332e38

Browse files
committed
Disable expanded mode only for \d tablename, not for all backslash
commands. Per complaint that \df+ is clearer in expanded mode.
1 parent69f16b5 commit3332e38

File tree

6 files changed

+11
-13
lines changed

6 files changed

+11
-13
lines changed

‎doc/src/sgml/release.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/release.sgml,v 1.394 2005/10/26 19:21:53 tgl Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/release.sgml,v 1.395 2005/10/27 13:34:46 momjian Exp $
33

44
Typical markup:
55

@@ -1700,7 +1700,7 @@ psql -t -f fixseq.sql db1 | psql -e db1
17001700
<listitem>
17011701
<para>
17021702
Prevent <command>\x</> (expanded mode) from affecting
1703-
backslash-command displays (Neil)
1703+
the output of <command>\d tablename<\> (Neil)
17041704
</para>
17051705
</listitem>
17061706

‎src/bin/psql/common.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/common.c,v 1.108 2005/10/15 02:49:40 momjian Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/common.c,v 1.109 2005/10/27 13:34:47 momjian Exp $
77
*/
88
#include"postgres_fe.h"
99
#include"common.h"
@@ -795,8 +795,6 @@ PrintQueryTuples(const PGresult *results)
795795
{
796796
printQueryOptmy_popt=pset.popt;
797797

798-
my_popt.topt.normal_query= true;
799-
800798
/* write output to \g argument, if any */
801799
if (pset.gfname)
802800
{

‎src/bin/psql/describe.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.128 2005/10/20 05:15:09 tgl Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.129 2005/10/27 13:34:47 momjian Exp $
77
*/
88
#include"postgres_fe.h"
99
#include"describe.h"
@@ -703,6 +703,9 @@ describeOneTableDetails(const char *schemaname,
703703

704704
retval= false;
705705

706+
/* This output looks confusing in expanded mode. */
707+
myopt.expanded= false;
708+
706709
initPQExpBuffer(&buf);
707710
initPQExpBuffer(&title);
708711
initPQExpBuffer(&tmpbuf);

‎src/bin/psql/print.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.78 2005/10/15 02:49:40 momjian Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.79 2005/10/27 13:34:47 momjian Exp $
77
*/
88
#include"postgres_fe.h"
99
#include"common.h"
@@ -1491,7 +1491,7 @@ printTable(const char *title,
14911491
* normal (user-submitted) query, not a table we're printing for a slash
14921492
* command.
14931493
*/
1494-
if (opt->expanded&&opt->normal_query)
1494+
if (opt->expanded)
14951495
use_expanded= true;
14961496
else
14971497
use_expanded= false;

‎src/bin/psql/print.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/print.h,v 1.29 2005/10/15 02:49:40 momjian Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/print.h,v 1.30 2005/10/27 13:34:47 momjian Exp $
77
*/
88
#ifndefPRINT_H
99
#definePRINT_H
@@ -43,8 +43,6 @@ typedef struct _printTableOpt
4343
* decimal marker */
4444
char*tableAttr;/* attributes for HTML <table ...> */
4545
intencoding;/* character encoding */
46-
boolnormal_query;/* are we presenting the results of a "normal"
47-
* query, or a slash command? */
4846
}printTableOpt;
4947

5048

‎src/bin/psql/startup.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/startup.c,v 1.125 2005/10/15 02:49:40 momjian Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/startup.c,v 1.126 2005/10/27 13:34:47 momjian Exp $
77
*/
88
#include"postgres_fe.h"
99

@@ -147,7 +147,6 @@ main(int argc, char *argv[])
147147
pset.queryFout=stdout;
148148
pset.popt.topt.border=1;
149149
pset.popt.topt.pager=1;
150-
pset.popt.topt.normal_query= false;
151150
pset.popt.default_footer= true;
152151

153152
SetVariable(pset.vars,"VERSION",PG_VERSION_STR);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp