*
* 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"
if (!query_buf)
{
- psql_error("no query buffer");
+ psql_error("no query buffer\n");
status = CMD_ERROR;
}
else
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);
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))
if (!query_buf)
{
- psql_error("no query buffer");
+ psql_error("no query buffer\n");
status = CMD_ERROR;
}
else
*
* 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"
{
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);
{
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);
*
* 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"
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
*
* 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"
{
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;
*
* 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"
previous_buf = createPQExpBuffer();
if (!query_buf || !previous_buf)
{
- psql_error("out of memory");
+ psql_error("out of memory\n");
exit(EXIT_FAILURE);
}
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);
}
*
* 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 $
*/
/*-----------
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);