/pgpatches/psql_banner
text/x-diff
Filename: /pgpatches/psql_banner
Type: text/x-diff
Part: 0
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: context
| File | + | − |
|---|---|---|
| src/bin/psql/command.c | 4 | 3 |
| src/bin/psql/command.h | 1 | 1 |
| src/bin/psql/startup.c | 1 | 1 |
Index: src/bin/psql/command.c
===================================================================
RCS file: /cvsroot/pgsql/src/bin/psql/command.c,v
retrieving revision 1.214
diff -c -c -r1.214 command.c
*** src/bin/psql/command.c 5 Feb 2010 03:09:05 -0000 1.214
--- src/bin/psql/command.c 6 Feb 2010 17:22:47 -0000
***************
*** 1331,1337 ****
PQsetNoticeProcessor(n_conn, NoticeProcessor, NULL);
pset.db = n_conn;
SyncVariables();
! connection_warnings(); /* Must be after SyncVariables */
/* Tell the user about the new connection */
if (!pset.quiet)
--- 1331,1337 ----
PQsetNoticeProcessor(n_conn, NoticeProcessor, NULL);
pset.db = n_conn;
SyncVariables();
! connection_warnings(false); /* Must be after SyncVariables */
/* Tell the user about the new connection */
if (!pset.quiet)
***************
*** 1357,1363 ****
void
! connection_warnings(void)
{
if (!pset.quiet && !pset.notty)
{
--- 1357,1363 ----
void
! connection_warnings(bool in_startup)
{
if (!pset.quiet && !pset.notty)
{
***************
*** 1383,1389 ****
printf(_("%s (%s, server %s)\n"),
pset.progname, PG_VERSION, server_version);
}
! else
printf("%s (%s)\n", pset.progname, PG_VERSION);
if (pset.sversion / 100 != client_ver / 100)
--- 1383,1390 ----
printf(_("%s (%s, server %s)\n"),
pset.progname, PG_VERSION, server_version);
}
! /* 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)
Index: src/bin/psql/command.h
===================================================================
RCS file: /cvsroot/pgsql/src/bin/psql/command.h,v
retrieving revision 1.33
diff -c -c -r1.33 command.h
*** src/bin/psql/command.h 2 Jan 2010 16:57:59 -0000 1.33
--- src/bin/psql/command.h 6 Feb 2010 17:22:47 -0000
***************
*** 34,40 ****
printQueryOpt *popt,
bool quiet);
! extern void connection_warnings(void);
extern void SyncVariables(void);
--- 34,40 ----
printQueryOpt *popt,
bool quiet);
! extern void connection_warnings(bool in_startup);
extern void SyncVariables(void);
Index: src/bin/psql/startup.c
===================================================================
RCS file: /cvsroot/pgsql/src/bin/psql/startup.c,v
retrieving revision 1.160
diff -c -c -r1.160 startup.c
*** src/bin/psql/startup.c 5 Feb 2010 03:09:05 -0000 1.160
--- src/bin/psql/startup.c 6 Feb 2010 17:22:47 -0000
***************
*** 294,300 ****
if (!options.no_psqlrc)
process_psqlrc(argv[0]);
! connection_warnings();
if (!pset.quiet && !pset.notty)
printf(_("Type \"help\" for help.\n\n"));
if (!pset.notty)
--- 294,300 ----
if (!options.no_psqlrc)
process_psqlrc(argv[0]);
! connection_warnings(true);
if (!pset.quiet && !pset.notty)
printf(_("Type \"help\" for help.\n\n"));
if (!pset.notty)