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
b3f66d19
Commit
b3f66d19
authored
May 12, 2001
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add command '\pset footer' to psql to turn off default "(x rows)" footer.
parent
bbc3920f
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
7 deletions
+30
-7
doc/src/sgml/ref/psql-ref.sgml
doc/src/sgml/ref/psql-ref.sgml
+10
-1
src/bin/psql/command.c
src/bin/psql/command.c
+13
-1
src/bin/psql/print.c
src/bin/psql/print.c
+2
-2
src/bin/psql/print.h
src/bin/psql/print.h
+3
-2
src/bin/psql/startup.c
src/bin/psql/startup.c
+2
-1
No files found.
doc/src/sgml/ref/psql-ref.sgml
View file @
b3f66d19
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.5
1 2001/05/09 17:29:10 momjian
Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.5
2 2001/05/12 19:44:45 petere
Exp $
Postgres documentation
-->
...
...
@@ -898,6 +898,15 @@ lo_import 152801
</listitem>
</varlistentry>
<varlistentry>
<term><literal>footer</literal></term>
<listitem>
<para>
Toggles the display of the default footer <literal>(x rows)</literal>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>recordsep</literal></term>
<listitem>
...
...
src/bin/psql/command.c
View file @
b3f66d19
...
...
@@ -3,7 +3,7 @@
*
* Copyright 2000 by PostgreSQL Global Development Group
*
* $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.5
3 2001/05/12 17:37:15 tgl
Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.5
4 2001/05/12 19:44:46 petere
Exp $
*/
#include "postgres_fe.h"
#include "command.h"
...
...
@@ -1796,6 +1796,18 @@ do_pset(const char *param, const char *value, printQueryOpt *popt, bool quiet)
}
}
/* disable "(x rows)" footer */
else
if
(
strcmp
(
param
,
"footer"
)
==
0
)
{
popt
->
default_footer
=
!
popt
->
default_footer
;
if
(
!
quiet
)
{
if
(
popt
->
default_footer
)
puts
(
"Default footer is on."
);
else
puts
(
"Default footer is off."
);
}
}
else
{
...
...
src/bin/psql/print.c
View file @
b3f66d19
...
...
@@ -3,7 +3,7 @@
*
* Copyright 2000 by PostgreSQL Global Development Group
*
* $Header: /cvsroot/pgsql/src/bin/psql/print.c,v 1.1
8 2001/03/22 04:00:22 momjian
Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/print.c,v 1.1
9 2001/05/12 19:44:46 petere
Exp $
*/
#include "postgres_fe.h"
#include "print.h"
...
...
@@ -1058,7 +1058,7 @@ printQuery(const PGresult *result, const printQueryOpt *opt, FILE *fout)
if
(
opt
->
footers
)
footers
=
opt
->
footers
;
else
if
(
!
opt
->
topt
.
expanded
)
else
if
(
!
opt
->
topt
.
expanded
&&
opt
->
default_footer
)
{
footers
=
calloc
(
2
,
sizeof
(
*
footers
));
if
(
!
footers
)
...
...
src/bin/psql/print.h
View file @
b3f66d19
...
...
@@ -3,7 +3,7 @@
*
* Copyright 2000 by PostgreSQL Global Development Group
*
* $Header: /cvsroot/pgsql/src/bin/psql/print.h,v 1.
8 2000/04/12 17:16:23 momjian
Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/print.h,v 1.
9 2001/05/12 19:44:46 petere
Exp $
*/
#ifndef PRINT_H
#define PRINT_H
...
...
@@ -64,6 +64,7 @@ typedef struct _printQueryOpt
char
*
title
;
/* override title */
char
**
footers
;
/* override footer (default is "(xx
* rows)") */
bool
default_footer
;
/* print default footer if footers==NULL */
}
printQueryOpt
;
/*
...
...
@@ -72,7 +73,7 @@ typedef struct _printQueryOpt
* It calls the printTable above with all the things set straight.
*/
void
printQuery
(
const
PGresult
*
result
,
const
printQueryOpt
*
opt
,
FILE
*
fout
);
printQuery
(
const
PGresult
*
result
,
const
printQueryOpt
*
opt
,
FILE
*
fout
);
#endif
/* PRINT_H */
src/bin/psql/startup.c
View file @
b3f66d19
...
...
@@ -3,7 +3,7 @@
*
* Copyright 2000 by PostgreSQL Global Development Group
*
* $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.4
7 2001/05/06 17:38:32
petere Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.4
8 2001/05/12 19:44:46
petere Exp $
*/
#include "postgres_fe.h"
...
...
@@ -135,6 +135,7 @@ main(int argc, char *argv[])
pset
.
queryFout
=
stdout
;
pset
.
popt
.
topt
.
border
=
1
;
pset
.
popt
.
topt
.
pager
=
true
;
pset
.
popt
.
default_footer
=
true
;
SetVariable
(
pset
.
vars
,
"VERSION"
,
PG_VERSION_STR
);
...
...
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