Commit e79b2dd5 authored by Tom Lane's avatar Tom Lane

Fix missing \n in some psql_error calls.

parent bf023bd1
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* Copyright 2000 by PostgreSQL Global Development Group * Copyright 2000 by PostgreSQL Global Development Group
* *
* $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.20 2000/02/19 05:01:15 ishii Exp $ * $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.21 2000/02/20 02:37:40 tgl Exp $
*/ */
#include "postgres.h" #include "postgres.h"
#include "command.h" #include "command.h"
...@@ -308,7 +308,7 @@ exec_command(const char *cmd, ...@@ -308,7 +308,7 @@ exec_command(const char *cmd,
if (!query_buf) if (!query_buf)
{ {
psql_error("no query buffer"); psql_error("no query buffer\n");
status = CMD_ERROR; status = CMD_ERROR;
} }
else else
...@@ -586,7 +586,7 @@ exec_command(const char *cmd, ...@@ -586,7 +586,7 @@ exec_command(const char *cmd,
newval = realloc(newval, strlen(newval) + strlen(opt) + 1); newval = realloc(newval, strlen(newval) + strlen(opt) + 1);
if (!newval) if (!newval)
{ {
psql_error("out of memory"); psql_error("out of memory\n");
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
strcat(newval, opt); strcat(newval, opt);
...@@ -622,7 +622,7 @@ exec_command(const char *cmd, ...@@ -622,7 +622,7 @@ exec_command(const char *cmd,
char * opt = scan_option(&string, OT_NORMAL, NULL); char * opt = scan_option(&string, OT_NORMAL, NULL);
if (!opt) if (!opt)
{ {
psql_error("\\%s: missing required argument", cmd); psql_error("\\%s: missing required argument\n", cmd);
success = false; success = false;
} }
if (!SetVariable(pset.vars, opt, NULL)) if (!SetVariable(pset.vars, opt, NULL))
...@@ -642,7 +642,7 @@ exec_command(const char *cmd, ...@@ -642,7 +642,7 @@ exec_command(const char *cmd,
if (!query_buf) if (!query_buf)
{ {
psql_error("no query buffer"); psql_error("no query buffer\n");
status = CMD_ERROR; status = CMD_ERROR;
} }
else else
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* Copyright 2000 by PostgreSQL Global Development Group * Copyright 2000 by PostgreSQL Global Development Group
* *
* $Header: /cvsroot/pgsql/src/bin/psql/common.c,v 1.14 2000/02/16 13:15:26 momjian Exp $ * $Header: /cvsroot/pgsql/src/bin/psql/common.c,v 1.15 2000/02/20 02:37:40 tgl Exp $
*/ */
#include "postgres.h" #include "postgres.h"
#include "common.h" #include "common.h"
...@@ -301,7 +301,7 @@ PSQLexec(const char *query) ...@@ -301,7 +301,7 @@ PSQLexec(const char *query)
{ {
if (!pset.cur_cmd_interactive) if (!pset.cur_cmd_interactive)
{ {
psql_error("connection to server was lost"); psql_error("connection to server was lost\n");
exit(EXIT_BADCONN); exit(EXIT_BADCONN);
} }
fputs("The connection to the server was lost. Attempting reset: ", stderr); fputs("The connection to the server was lost. Attempting reset: ", stderr);
...@@ -479,7 +479,7 @@ SendQuery(const char *query) ...@@ -479,7 +479,7 @@ SendQuery(const char *query)
{ {
if (!pset.cur_cmd_interactive) if (!pset.cur_cmd_interactive)
{ {
psql_error("connection to server was lost"); psql_error("connection to server was lost\n");
exit(EXIT_BADCONN); exit(EXIT_BADCONN);
} }
fputs("The connection to the server was lost. Attempting reset: ", stderr); fputs("The connection to the server was lost. Attempting reset: ", stderr);
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* Copyright 2000 by PostgreSQL Global Development Group * Copyright 2000 by PostgreSQL Global Development Group
* *
* $Header: /cvsroot/pgsql/src/bin/psql/help.c,v 1.20 2000/02/19 05:01:16 ishii Exp $ * $Header: /cvsroot/pgsql/src/bin/psql/help.c,v 1.21 2000/02/20 02:37:40 tgl Exp $
*/ */
#include "postgres.h" #include "postgres.h"
#include "help.h" #include "help.h"
...@@ -57,7 +57,7 @@ usage(void) ...@@ -57,7 +57,7 @@ usage(void)
user = pw->pw_name; user = pw->pw_name;
else else
{ {
psql_error("could not get current user name: %s", strerror(errno)); psql_error("could not get current user name: %s\n", strerror(errno));
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
#else #else
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* Copyright 2000 by PostgreSQL Global Development Group * Copyright 2000 by PostgreSQL Global Development Group
* *
* $Header: /cvsroot/pgsql/src/bin/psql/input.c,v 1.10 2000/02/16 13:15:26 momjian Exp $ * $Header: /cvsroot/pgsql/src/bin/psql/input.c,v 1.11 2000/02/20 02:37:40 tgl Exp $
*/ */
#include "postgres.h" #include "postgres.h"
#include "input.h" #include "input.h"
...@@ -160,7 +160,7 @@ saveHistory(char *fname) ...@@ -160,7 +160,7 @@ saveHistory(char *fname)
{ {
if (write_history(fname) != 0) if (write_history(fname) != 0)
{ {
psql_error("could not save history to %s: %s", fname, strerror(errno)); psql_error("could not save history to %s: %s\n", fname, strerror(errno));
return false; return false;
} }
return true; return true;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* Copyright 2000 by PostgreSQL Global Development Group * Copyright 2000 by PostgreSQL Global Development Group
* *
* $Header: /cvsroot/pgsql/src/bin/psql/mainloop.c,v 1.20 2000/02/16 13:15:26 momjian Exp $ * $Header: /cvsroot/pgsql/src/bin/psql/mainloop.c,v 1.21 2000/02/20 02:37:40 tgl Exp $
*/ */
#include "postgres.h" #include "postgres.h"
#include "mainloop.h" #include "mainloop.h"
...@@ -73,7 +73,7 @@ MainLoop(FILE *source) ...@@ -73,7 +73,7 @@ MainLoop(FILE *source)
previous_buf = createPQExpBuffer(); previous_buf = createPQExpBuffer();
if (!query_buf || !previous_buf) if (!query_buf || !previous_buf)
{ {
psql_error("out of memory"); psql_error("out of memory\n");
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
...@@ -311,7 +311,7 @@ MainLoop(FILE *source) ...@@ -311,7 +311,7 @@ MainLoop(FILE *source)
new = malloc(len + out_length - (1 + in_length) + 1); new = malloc(len + out_length - (1 + in_length) + 1);
if (!new) if (!new)
{ {
psql_error("out of memory"); psql_error("out of memory\n");
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* Copyright 2000 by PostgreSQL Global Development Group * Copyright 2000 by PostgreSQL Global Development Group
* *
* $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.12 2000/02/16 13:15:26 momjian Exp $ * $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.13 2000/02/20 02:37:40 tgl Exp $
*/ */
/*----------- /*-----------
...@@ -726,7 +726,7 @@ PGresult * exec_query(char * query) ...@@ -726,7 +726,7 @@ PGresult * exec_query(char * query)
if (result != NULL && PQresultStatus(result) != PGRES_TUPLES_OK) { if (result != NULL && PQresultStatus(result) != PGRES_TUPLES_OK) {
#if 0 #if 0
psql_error("tab completion: %s failed - %s", psql_error("tab completion: %s failed - %s\n",
query, PQresStatus(PQresultStatus(result))); query, PQresStatus(PQresultStatus(result)));
#endif #endif
PQclear(result); PQclear(result);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment