|
3 | 3 | *
|
4 | 4 | * Copyright 2000 by PostgreSQL Global Development Group
|
5 | 5 | *
|
6 |
| - * $Header: /cvsroot/pgsql/src/bin/psql/common.c,v 1.68 2003/08/0400:43:29 momjian Exp $ |
| 6 | + * $Header: /cvsroot/pgsql/src/bin/psql/common.c,v 1.69 2003/08/0419:10:40 tgl Exp $ |
7 | 7 | */
|
8 | 8 | #include"postgres_fe.h"
|
9 | 9 | #include"common.h"
|
@@ -247,7 +247,7 @@ ConnectionUp()
|
247 | 247 | * with a code of EXIT_BADCONN.
|
248 | 248 | */
|
249 | 249 | staticbool
|
250 |
| -CheckConnection() |
| 250 | +CheckConnection(void) |
251 | 251 | {
|
252 | 252 | boolOK;
|
253 | 253 |
|
@@ -344,8 +344,8 @@ AcceptResult(const PGresult *result)
|
344 | 344 |
|
345 | 345 | if (!OK)
|
346 | 346 | {
|
347 |
| -CheckConnection(); |
348 | 347 | psql_error("%s",PQerrorMessage(pset.db));
|
| 348 | +CheckConnection(); |
349 | 349 | }
|
350 | 350 |
|
351 | 351 | returnOK;
|
@@ -514,7 +514,8 @@ PrintQueryResults(PGresult *results,
|
514 | 514 | if (pset.popt.topt.format==PRINT_HTML)
|
515 | 515 | {
|
516 | 516 | fputs("<p>",pset.queryFout);
|
517 |
| -html_escaped_print(PQcmdStatus(results),pset.queryFout); |
| 517 | +html_escaped_print(PQcmdStatus(results), |
| 518 | +pset.queryFout); |
518 | 519 | fputs("</p>\n",pset.queryFout);
|
519 | 520 | }
|
520 | 521 | else
|
@@ -542,6 +543,7 @@ PrintQueryResults(PGresult *results,
|
542 | 543 |
|
543 | 544 | fflush(pset.queryFout);
|
544 | 545 |
|
| 546 | +/* may need this to recover from conn loss during COPY */ |
545 | 547 | if (!CheckConnection())
|
546 | 548 | return false;
|
547 | 549 |
|
|