|
7 | 7 | *
|
8 | 8 | *
|
9 | 9 | * IDENTIFICATION
|
10 |
| - * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.18 1996/08/14 04:56:48 scrappy Exp $ |
| 10 | + * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.19 1996/08/14 05:44:25 scrappy Exp $ |
11 | 11 | *
|
12 | 12 | *-------------------------------------------------------------------------
|
13 | 13 | */
|
@@ -133,7 +133,7 @@ slashUsage(PsqlSettings *ps)
|
133 | 133 | fprintf(stderr,"\t \\C [<captn>] -- set html3 caption (currently '%s')\n", ps->opt.caption? ps->opt.caption: "");
|
134 | 134 | fprintf(stderr,"\t \\c <dbname> -- connect to new database (currently '%s')\n", PQdb(ps->db));
|
135 | 135 | fprintf(stderr,"\t \\d [<table>] -- list tables in database or columns in <table>,* for all\n");
|
136 |
| - fprintf(stderr,"\t \\e [<fname>] -- edit the current query buffer or <fname>, \\E execute too\n"); |
| 136 | + fprintf(stderr,"\t \\e [<fname>] -- edit the current query buffer or <fname>,\\E execute too\n"); |
137 | 137 | fprintf(stderr,"\t \\f [<sep>] -- change field separater (currently '%s')\n", ps->opt.fieldSep);
|
138 | 138 | fprintf(stderr,"\t \\g [<fname>] -- send query to backend [and place results in <fname>]\n");
|
139 | 139 | fprintf(stderr,"\t \\g |<cmd> -- send query to backend and pipe results into <cmd>\n");
|
@@ -1291,7 +1291,9 @@ handleCopyOut(PGresult *res, bool quiet)
|
1291 | 1291 | while (!copydone) {
|
1292 | 1292 | ret = PQgetline(res->conn, copybuf, COPYBUFSIZ);
|
1293 | 1293 |
|
1294 |
| - if (copybuf[0] == '.' && copybuf[1] =='\0') { |
| 1294 | + if (copybuf[0] == '\\' && |
| 1295 | + copybuf[1] == '.' && |
| 1296 | + copybuf[2] =='\0') { |
1295 | 1297 | copydone = true; /* don't print this... */
|
1296 | 1298 | } else {
|
1297 | 1299 | fputs(copybuf, stdout);
|
@@ -1325,7 +1327,7 @@ handleCopyIn(PGresult *res, bool quiet)
|
1325 | 1327 |
|
1326 | 1328 | if (!quiet) {
|
1327 | 1329 | fputs("Enter info followed by a newline\n", stdout);
|
1328 |
| - fputs("End with a dot on a line by itself.\n", stdout); |
| 1330 | + fputs("End with a backslash and a period on a line by itself.\n", stdout); |
1329 | 1331 | }
|
1330 | 1332 |
|
1331 | 1333 | /*
|
@@ -1354,14 +1356,14 @@ handleCopyIn(PGresult *res, bool quiet)
|
1354 | 1356 | }
|
1355 | 1357 | if (c == EOF) {
|
1356 | 1358 | /* reading from stdin, but from a file */
|
1357 |
| - PQputline(res->conn, "."); |
| 1359 | + PQputline(res->conn, "\\."); |
1358 | 1360 | copydone = true;
|
1359 | 1361 | break;
|
1360 | 1362 | }
|
1361 | 1363 | *s = '\0';
|
1362 | 1364 | PQputline(res->conn, copybuf);
|
1363 | 1365 | if (firstload) {
|
1364 |
| - if (!strcmp(copybuf, ".")) { |
| 1366 | + if (!strcmp(copybuf, "\\.")) { |
1365 | 1367 | copydone = true;
|
1366 | 1368 | }
|
1367 | 1369 | firstload = false;
|
|
0 commit comments