diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2004-01-20 23:48:56 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2004-01-20 23:48:56 +0000 |
commit | 04cc4e18dd34f3c301237e60058cc7a00bad41f4 (patch) | |
tree | 3c559b31c951a66b55492a16c4f098eeb3165485 /src/bin/psql/common.c | |
parent | 0f8a3135088519f60946a1f8d8f75cfe1e9b55b8 (diff) | |
download | postgresql-04cc4e18dd34f3c301237e60058cc7a00bad41f4.tar.gz postgresql-04cc4e18dd34f3c301237e60058cc7a00bad41f4.zip |
Implement '\copy from -' to support reading copy data from the same
source the \copy came from. Also, fix prompting logic so that initial
and per-line prompts appear for all cases of reading from an interactive
terminal. Patch by Mark Feit, with some kibitzing by Tom Lane.
Diffstat (limited to 'src/bin/psql/common.c')
-rw-r--r-- | src/bin/psql/common.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/bin/psql/common.c b/src/bin/psql/common.c index 1e113ac49aa..ed3649dfe1d 100644 --- a/src/bin/psql/common.c +++ b/src/bin/psql/common.c @@ -3,7 +3,7 @@ * * Copyright (c) 2000-2003, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/bin/psql/common.c,v 1.79 2004/01/09 21:12:20 momjian Exp $ + * $PostgreSQL: pgsql/src/bin/psql/common.c,v 1.80 2004/01/20 23:48:56 tgl Exp $ */ #include "postgres_fe.h" #include "common.h" @@ -513,12 +513,7 @@ ProcessCopyResult(PGresult *results) break; case PGRES_COPY_IN: - if (pset.cur_cmd_interactive && !QUIET()) - puts(gettext("Enter data to be copied followed by a newline.\n" - "End with a backslash and a period on a line by itself.")); - - success = handleCopyIn(pset.db, pset.cur_cmd_source, - pset.cur_cmd_interactive ? get_prompt(PROMPT_COPY) : NULL); + success = handleCopyIn(pset.db, pset.cur_cmd_source); break; default: |