Skip to content

Commit e79b2dd

Browse files
committed
Fix missing \n in some psql_error calls.
1 parent bf023bd commit e79b2dd

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

src/bin/psql/command.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright 2000 by PostgreSQL Global Development Group
55
*
6-
* $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.20 2000/02/19 05:01:15 ishii Exp $
6+
* $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.21 2000/02/20 02:37:40 tgl Exp $
77
*/
88
#include "postgres.h"
99
#include "command.h"
@@ -308,7 +308,7 @@ exec_command(const char *cmd,
308308

309309
if (!query_buf)
310310
{
311-
psql_error("no query buffer");
311+
psql_error("no query buffer\n");
312312
status = CMD_ERROR;
313313
}
314314
else
@@ -586,7 +586,7 @@ exec_command(const char *cmd,
586586
newval = realloc(newval, strlen(newval) + strlen(opt) + 1);
587587
if (!newval)
588588
{
589-
psql_error("out of memory");
589+
psql_error("out of memory\n");
590590
exit(EXIT_FAILURE);
591591
}
592592
strcat(newval, opt);
@@ -622,7 +622,7 @@ exec_command(const char *cmd,
622622
char * opt = scan_option(&string, OT_NORMAL, NULL);
623623
if (!opt)
624624
{
625-
psql_error("\\%s: missing required argument", cmd);
625+
psql_error("\\%s: missing required argument\n", cmd);
626626
success = false;
627627
}
628628
if (!SetVariable(pset.vars, opt, NULL))
@@ -642,7 +642,7 @@ exec_command(const char *cmd,
642642

643643
if (!query_buf)
644644
{
645-
psql_error("no query buffer");
645+
psql_error("no query buffer\n");
646646
status = CMD_ERROR;
647647
}
648648
else

src/bin/psql/common.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright 2000 by PostgreSQL Global Development Group
55
*
6-
* $Header: /cvsroot/pgsql/src/bin/psql/common.c,v 1.14 2000/02/16 13:15:26 momjian Exp $
6+
* $Header: /cvsroot/pgsql/src/bin/psql/common.c,v 1.15 2000/02/20 02:37:40 tgl Exp $
77
*/
88
#include "postgres.h"
99
#include "common.h"
@@ -301,7 +301,7 @@ PSQLexec(const char *query)
301301
{
302302
if (!pset.cur_cmd_interactive)
303303
{
304-
psql_error("connection to server was lost");
304+
psql_error("connection to server was lost\n");
305305
exit(EXIT_BADCONN);
306306
}
307307
fputs("The connection to the server was lost. Attempting reset: ", stderr);
@@ -479,7 +479,7 @@ SendQuery(const char *query)
479479
{
480480
if (!pset.cur_cmd_interactive)
481481
{
482-
psql_error("connection to server was lost");
482+
psql_error("connection to server was lost\n");
483483
exit(EXIT_BADCONN);
484484
}
485485
fputs("The connection to the server was lost. Attempting reset: ", stderr);

src/bin/psql/help.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright 2000 by PostgreSQL Global Development Group
55
*
6-
* $Header: /cvsroot/pgsql/src/bin/psql/help.c,v 1.20 2000/02/19 05:01:16 ishii Exp $
6+
* $Header: /cvsroot/pgsql/src/bin/psql/help.c,v 1.21 2000/02/20 02:37:40 tgl Exp $
77
*/
88
#include "postgres.h"
99
#include "help.h"
@@ -57,7 +57,7 @@ usage(void)
5757
user = pw->pw_name;
5858
else
5959
{
60-
psql_error("could not get current user name: %s", strerror(errno));
60+
psql_error("could not get current user name: %s\n", strerror(errno));
6161
exit(EXIT_FAILURE);
6262
}
6363
#else

src/bin/psql/input.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright 2000 by PostgreSQL Global Development Group
55
*
6-
* $Header: /cvsroot/pgsql/src/bin/psql/input.c,v 1.10 2000/02/16 13:15:26 momjian Exp $
6+
* $Header: /cvsroot/pgsql/src/bin/psql/input.c,v 1.11 2000/02/20 02:37:40 tgl Exp $
77
*/
88
#include "postgres.h"
99
#include "input.h"
@@ -160,7 +160,7 @@ saveHistory(char *fname)
160160
{
161161
if (write_history(fname) != 0)
162162
{
163-
psql_error("could not save history to %s: %s", fname, strerror(errno));
163+
psql_error("could not save history to %s: %s\n", fname, strerror(errno));
164164
return false;
165165
}
166166
return true;

src/bin/psql/mainloop.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright 2000 by PostgreSQL Global Development Group
55
*
6-
* $Header: /cvsroot/pgsql/src/bin/psql/mainloop.c,v 1.20 2000/02/16 13:15:26 momjian Exp $
6+
* $Header: /cvsroot/pgsql/src/bin/psql/mainloop.c,v 1.21 2000/02/20 02:37:40 tgl Exp $
77
*/
88
#include "postgres.h"
99
#include "mainloop.h"
@@ -73,7 +73,7 @@ MainLoop(FILE *source)
7373
previous_buf = createPQExpBuffer();
7474
if (!query_buf || !previous_buf)
7575
{
76-
psql_error("out of memory");
76+
psql_error("out of memory\n");
7777
exit(EXIT_FAILURE);
7878
}
7979

@@ -311,7 +311,7 @@ MainLoop(FILE *source)
311311
new = malloc(len + out_length - (1 + in_length) + 1);
312312
if (!new)
313313
{
314-
psql_error("out of memory");
314+
psql_error("out of memory\n");
315315
exit(EXIT_FAILURE);
316316
}
317317

src/bin/psql/tab-complete.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright 2000 by PostgreSQL Global Development Group
55
*
6-
* $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.12 2000/02/16 13:15:26 momjian Exp $
6+
* $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.13 2000/02/20 02:37:40 tgl Exp $
77
*/
88

99
/*-----------
@@ -726,7 +726,7 @@ PGresult * exec_query(char * query)
726726

727727
if (result != NULL && PQresultStatus(result) != PGRES_TUPLES_OK) {
728728
#if 0
729-
psql_error("tab completion: %s failed - %s",
729+
psql_error("tab completion: %s failed - %s\n",
730730
query, PQresStatus(PQresultStatus(result)));
731731
#endif
732732
PQclear(result);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy