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
c64e68fd
Commit
c64e68fd
authored
Oct 03, 2013
by
Robert Haas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
psql: Make \pset without arguments show all settings.
Gilles Darold, reviewed by Pavel Stehule
parent
c2b175b9
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
196 additions
and
93 deletions
+196
-93
doc/src/sgml/ref/psql-ref.sgml
doc/src/sgml/ref/psql-ref.sgml
+1
-4
src/bin/psql/command.c
src/bin/psql/command.c
+175
-88
src/bin/psql/help.c
src/bin/psql/help.c
+1
-1
src/test/regress/expected/psql.out
src/test/regress/expected/psql.out
+16
-0
src/test/regress/sql/psql.sql
src/test/regress/sql/psql.sql
+3
-0
No files found.
doc/src/sgml/ref/psql-ref.sgml
View file @
c64e68fd
...
@@ -2272,13 +2272,10 @@ lo_import 152801
...
@@ -2272,13 +2272,10 @@ lo_import 152801
</para>
</para>
</tip>
</tip>
<note>
<para>
<para>
It is an error to call <command>\pset</command> without any
<command>\pset</command> without any arguments displays the current status
arguments. In the future this case might show the current status
of all printing options.
of all printing options.
</para>
</para>
</note>
</listitem>
</listitem>
</varlistentry>
</varlistentry>
...
...
src/bin/psql/command.c
View file @
c64e68fd
This diff is collapsed.
Click to expand it.
src/bin/psql/help.c
View file @
c64e68fd
...
@@ -247,7 +247,7 @@ slashUsage(unsigned short int pager)
...
@@ -247,7 +247,7 @@ slashUsage(unsigned short int pager)
fprintf
(
output
,
_
(
"
\\
f [STRING] show or set field separator for unaligned query output
\n
"
));
fprintf
(
output
,
_
(
"
\\
f [STRING] show or set field separator for unaligned query output
\n
"
));
fprintf
(
output
,
_
(
"
\\
H toggle HTML output mode (currently %s)
\n
"
),
fprintf
(
output
,
_
(
"
\\
H toggle HTML output mode (currently %s)
\n
"
),
ON
(
pset
.
popt
.
topt
.
format
==
PRINT_HTML
));
ON
(
pset
.
popt
.
topt
.
format
==
PRINT_HTML
));
fprintf
(
output
,
_
(
"
\\
pset
NAME [VALUE
] set table output option
\n
"
fprintf
(
output
,
_
(
"
\\
pset
[NAME [VALUE]
] set table output option
\n
"
" (NAME := {format|border|expanded|fieldsep|fieldsep_zero|footer|null|
\n
"
" (NAME := {format|border|expanded|fieldsep|fieldsep_zero|footer|null|
\n
"
" numericlocale|recordsep|recordsep_zero|tuples_only|title|tableattr|pager})
\n
"
));
" numericlocale|recordsep|recordsep_zero|tuples_only|title|tableattr|pager})
\n
"
));
fprintf
(
output
,
_
(
"
\\
t [on|off] show only rows (currently %s)
\n
"
),
fprintf
(
output
,
_
(
"
\\
t [on|off] show only rows (currently %s)
\n
"
),
...
...
src/test/regress/expected/psql.out
View file @
c64e68fd
...
@@ -52,3 +52,19 @@ more than one row returned for \gset
...
@@ -52,3 +52,19 @@ more than one row returned for \gset
select 10 as test01, 20 as test02 from generate_series(1,0) \gset
select 10 as test01, 20 as test02 from generate_series(1,0) \gset
no rows returned for \gset
no rows returned for \gset
\unset FETCH_COUNT
\unset FETCH_COUNT
-- show all pset options
\pset
Border style (border) is 1.
Target width (columns) unset.
Expanded display (expanded) is off.
Field separator (fieldsep) is "|".
Default footer (footer) is on.
Output format (format) is aligned.
Line style (linestyle) is ascii.
Null display (null) is "".
Locale-adjusted numeric output (numericlocale) is off.
Pager (pager) is used for long output.
Record separator (recordsep) is <newline>.
Table attributes (tableattr) unset.
Title (title) unset.
Tuples only (tuples_only) is off.
src/test/regress/sql/psql.sql
View file @
c64e68fd
...
@@ -37,3 +37,6 @@ select 10 as test01, 20 as test02 from generate_series(1,3) \gset
...
@@ -37,3 +37,6 @@ select 10 as test01, 20 as test02 from generate_series(1,3) \gset
select
10
as
test01
,
20
as
test02
from
generate_series
(
1
,
0
)
\
gset
select
10
as
test01
,
20
as
test02
from
generate_series
(
1
,
0
)
\
gset
\
unset
FETCH_COUNT
\
unset
FETCH_COUNT
-- show all pset options
\
pset
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