From e79b2dd5e7316c54c69a6d599d07b6bdf22e1d8b Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 20 Feb 2000 02:37:40 +0000 Subject: [PATCH] Fix missing \n in some psql_error calls. --- src/bin/psql/command.c | 10 +++++----- src/bin/psql/common.c | 6 +++--- src/bin/psql/help.c | 4 ++-- src/bin/psql/input.c | 4 ++-- src/bin/psql/mainloop.c | 6 +++--- src/bin/psql/tab-complete.c | 4 ++-- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c index cf1e701c0e1..02bcb9335f3 100644 --- a/src/bin/psql/command.c +++ b/src/bin/psql/command.c @@ -3,7 +3,7 @@ * * 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 "command.h" @@ -308,7 +308,7 @@ exec_command(const char *cmd, if (!query_buf) { - psql_error("no query buffer"); + psql_error("no query buffer\n"); status = CMD_ERROR; } else @@ -586,7 +586,7 @@ exec_command(const char *cmd, newval = realloc(newval, strlen(newval) + strlen(opt) + 1); if (!newval) { - psql_error("out of memory"); + psql_error("out of memory\n"); exit(EXIT_FAILURE); } strcat(newval, opt); @@ -622,7 +622,7 @@ exec_command(const char *cmd, char * opt = scan_option(&string, OT_NORMAL, NULL); if (!opt) { - psql_error("\\%s: missing required argument", cmd); + psql_error("\\%s: missing required argument\n", cmd); success = false; } if (!SetVariable(pset.vars, opt, NULL)) @@ -642,7 +642,7 @@ exec_command(const char *cmd, if (!query_buf) { - psql_error("no query buffer"); + psql_error("no query buffer\n"); status = CMD_ERROR; } else diff --git a/src/bin/psql/common.c b/src/bin/psql/common.c index 340f053bdf5..c86a2f3d834 100644 --- a/src/bin/psql/common.c +++ b/src/bin/psql/common.c @@ -3,7 +3,7 @@ * * 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 "common.h" @@ -301,7 +301,7 @@ PSQLexec(const char *query) { if (!pset.cur_cmd_interactive) { - psql_error("connection to server was lost"); + psql_error("connection to server was lost\n"); exit(EXIT_BADCONN); } fputs("The connection to the server was lost. Attempting reset: ", stderr); @@ -479,7 +479,7 @@ SendQuery(const char *query) { if (!pset.cur_cmd_interactive) { - psql_error("connection to server was lost"); + psql_error("connection to server was lost\n"); exit(EXIT_BADCONN); } fputs("The connection to the server was lost. Attempting reset: ", stderr); diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index ddd8b22c350..30d2307e892 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -3,7 +3,7 @@ * * 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 "help.h" @@ -57,7 +57,7 @@ usage(void) user = pw->pw_name; 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); } #else diff --git a/src/bin/psql/input.c b/src/bin/psql/input.c index 6d05370d21a..2e509aad0b1 100644 --- a/src/bin/psql/input.c +++ b/src/bin/psql/input.c @@ -3,7 +3,7 @@ * * 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 "input.h" @@ -160,7 +160,7 @@ saveHistory(char *fname) { 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 true; diff --git a/src/bin/psql/mainloop.c b/src/bin/psql/mainloop.c index 8d5f53087da..28d7b58bb06 100644 --- a/src/bin/psql/mainloop.c +++ b/src/bin/psql/mainloop.c @@ -3,7 +3,7 @@ * * 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 "mainloop.h" @@ -73,7 +73,7 @@ MainLoop(FILE *source) previous_buf = createPQExpBuffer(); if (!query_buf || !previous_buf) { - psql_error("out of memory"); + psql_error("out of memory\n"); exit(EXIT_FAILURE); } @@ -311,7 +311,7 @@ MainLoop(FILE *source) new = malloc(len + out_length - (1 + in_length) + 1); if (!new) { - psql_error("out of memory"); + psql_error("out of memory\n"); exit(EXIT_FAILURE); } diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index 83e3041fd94..f1492e11ed3 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -3,7 +3,7 @@ * * 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) if (result != NULL && PQresultStatus(result) != PGRES_TUPLES_OK) { #if 0 - psql_error("tab completion: %s failed - %s", + psql_error("tab completion: %s failed - %s\n", query, PQresStatus(PQresultStatus(result))); #endif PQclear(result); -- 2.39.5