From 04cc4e18dd34f3c301237e60058cc7a00bad41f4 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 20 Jan 2004 23:48:56 +0000 Subject: 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. --- src/bin/psql/common.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/bin/psql/common.c') 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: -- cgit v1.2.3