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
55ea144a
Commit
55ea144a
authored
Feb 16, 2010
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent psql version banner from being printed by the \c command if the
versions match, per report from Peter.
parent
aa7e7ae9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
8 deletions
+9
-8
src/bin/psql/command.c
src/bin/psql/command.c
+5
-4
src/bin/psql/command.h
src/bin/psql/command.h
+2
-2
src/bin/psql/startup.c
src/bin/psql/startup.c
+2
-2
No files found.
src/bin/psql/command.c
View file @
55ea144a
...
...
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2010, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.21
4 2010/02/05 03:09:05 joe
Exp $
* $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.21
5 2010/02/16 21:07:01 momjian
Exp $
*/
#include "postgres_fe.h"
#include "command.h"
...
...
@@ -1331,7 +1331,7 @@ do_connect(char *dbname, char *user, char *host, char *port)
PQsetNoticeProcessor
(
n_conn
,
NoticeProcessor
,
NULL
);
pset
.
db
=
n_conn
;
SyncVariables
();
connection_warnings
();
/* Must be after SyncVariables */
connection_warnings
(
false
);
/* Must be after SyncVariables */
/* Tell the user about the new connection */
if
(
!
pset
.
quiet
)
...
...
@@ -1357,7 +1357,7 @@ do_connect(char *dbname, char *user, char *host, char *port)
void
connection_warnings
(
void
)
connection_warnings
(
bool
in_startup
)
{
if
(
!
pset
.
quiet
&&
!
pset
.
notty
)
{
...
...
@@ -1383,7 +1383,8 @@ connection_warnings(void)
printf
(
_
(
"%s (%s, server %s)
\n
"
),
pset
.
progname
,
PG_VERSION
,
server_version
);
}
else
/* For version match, only print psql banner on startup. */
else
if
(
in_startup
)
printf
(
"%s (%s)
\n
"
,
pset
.
progname
,
PG_VERSION
);
if
(
pset
.
sversion
/
100
!=
client_ver
/
100
)
...
...
src/bin/psql/command.h
View file @
55ea144a
...
...
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2010, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/psql/command.h,v 1.3
3 2010/01/02 16:57:59
momjian Exp $
* $PostgreSQL: pgsql/src/bin/psql/command.h,v 1.3
4 2010/02/16 21:07:01
momjian Exp $
*/
#ifndef COMMAND_H
#define COMMAND_H
...
...
@@ -34,7 +34,7 @@ extern bool do_pset(const char *param,
printQueryOpt
*
popt
,
bool
quiet
);
extern
void
connection_warnings
(
void
);
extern
void
connection_warnings
(
bool
in_startup
);
extern
void
SyncVariables
(
void
);
...
...
src/bin/psql/startup.c
View file @
55ea144a
...
...
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2010, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/psql/startup.c,v 1.16
0 2010/02/05 03:09:05 joe
Exp $
* $PostgreSQL: pgsql/src/bin/psql/startup.c,v 1.16
1 2010/02/16 21:07:01 momjian
Exp $
*/
#include "postgres_fe.h"
...
...
@@ -294,7 +294,7 @@ main(int argc, char *argv[])
if
(
!
options
.
no_psqlrc
)
process_psqlrc
(
argv
[
0
]);
connection_warnings
();
connection_warnings
(
true
);
if
(
!
pset
.
quiet
&&
!
pset
.
notty
)
printf
(
_
(
"Type
\"
help
\"
for help.
\n\n
"
));
if
(
!
pset
.
notty
)
...
...
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