Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
69ab7b9d
Commit
69ab7b9d
authored
Mar 11, 2016
by
Robert Haas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
psql: Don't automatically use expanded format when there's 1 column.
Andreas Karlsson and Robert Haas
parent
481c76ab
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
doc/src/sgml/ref/psql-ref.sgml
doc/src/sgml/ref/psql-ref.sgml
+3
-2
src/bin/psql/print.c
src/bin/psql/print.c
+4
-2
No files found.
doc/src/sgml/ref/psql-ref.sgml
View file @
69ab7b9d
...
@@ -2119,8 +2119,9 @@ lo_import 152801
...
@@ -2119,8 +2119,9 @@ lo_import 152801
column name on the left and the data on the right. This mode is
column name on the left and the data on the right. This mode is
useful if the data wouldn't fit on the screen in the
useful if the data wouldn't fit on the screen in the
normal <quote>horizontal</quote> mode. In the auto setting, the
normal <quote>horizontal</quote> mode. In the auto setting, the
expanded mode is used whenever the query output is wider than the
expanded mode is used whenever the query output has more than one
screen, otherwise the regular mode is used. The auto setting is only
column and is wider than the screen; otherwise, the regular mode is
used. The auto setting is only
effective in the aligned and wrapped formats. In other formats, it
effective in the aligned and wrapped formats. In other formats, it
always behaves as if the expanded mode is off.
always behaves as if the expanded mode is off.
</para>
</para>
...
...
src/bin/psql/print.c
View file @
69ab7b9d
...
@@ -816,9 +816,11 @@ print_aligned_text(const printTableContent *cont, FILE *fout, bool is_pager)
...
@@ -816,9 +816,11 @@ print_aligned_text(const printTableContent *cont, FILE *fout, bool is_pager)
/*
/*
* If in expanded auto mode, we have now calculated the expected width, so
* If in expanded auto mode, we have now calculated the expected width, so
* we can now escape to vertical mode if necessary.
* we can now escape to vertical mode if necessary. If the output has
* only one column, the expanded format would be wider than the regular
* format, so don't use it in that case.
*/
*/
if
(
cont
->
opt
->
expanded
==
2
&&
output_columns
>
0
&&
if
(
cont
->
opt
->
expanded
==
2
&&
output_columns
>
0
&&
cont
->
ncolumns
>
1
&&
(
output_columns
<
total_header_width
||
output_columns
<
width_total
))
(
output_columns
<
total_header_width
||
output_columns
<
width_total
))
{
{
print_aligned_vertical
(
cont
,
fout
,
is_pager
);
print_aligned_vertical
(
cont
,
fout
,
is_pager
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment