Fix missing \n in some psql_error calls.
authorTom Lane
Sun, 20 Feb 2000 02:37:40 +0000 (02:37 +0000)
committerTom Lane
Sun, 20 Feb 2000 02:37:40 +0000 (02:37 +0000)
src/bin/psql/command.c
src/bin/psql/common.c
src/bin/psql/help.c
src/bin/psql/input.c
src/bin/psql/mainloop.c
src/bin/psql/tab-complete.c

index cf1e701c0e19cecd20df057e3eaa2381cdea1138..02bcb9335f3f9a5ecbcb4efc1a454ccd68ee7bbf 100644 (file)
@@ -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
index 340f053bdf5bc5df770d5a80de1e5f486d2ca718..c86a2f3d834f427fe4478c6facd94db01be76a56 100644 (file)
@@ -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);
index ddd8b22c3506e057084dd1df0875d968164094f1..30d2307e892c6a82619b4564a9b0b7ab1aa3a054 100644 (file)
@@ -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
index 6d05370d21a498a06c676f003a4ec99c3c62d30d..2e509aad0b1bd973f3eb8cba266f854d7a8adea7 100644 (file)
@@ -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;
index 8d5f53087da5cea41617d9c100cbf2f3728e0ce3..28d7b58bb061328186fdd3956d6d05479fdaac9d 100644 (file)
@@ -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);
                     }
 
index 83e3041fd942209c4b73aa8e3a125ed65402e737..f1492e11ed31e73ec0a11f5417315507e4cb9aa6 100644 (file)
@@ -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);