diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-06-28 00:12:40 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-06-28 00:12:40 +0000 |
commit | f9ebf36970df6e61142dbe7590482cd240fdb66a (patch) | |
tree | 9dd310595417c131d80a018540029ec822729424 /src/bin/psql/copy.c | |
parent | ea20397b79f795441d48eae0ace03caf4c108a3c (diff) |
Update psql for some features of new FE/BE protocol. There is a
client-side AUTOCOMMIT mode now: '\set AUTOCOMMIT off' supports
SQL-spec commit behavior. Get rid of LO_TRANSACTION hack --- the
LO operations just work now, using libpq's ability to track the
transaction status. Add a VERBOSE variable to control verboseness
of error message display, and add a %T prompt-string code to show
current transaction-block status. Superuser state display in the
prompt string correctly follows SET SESSION AUTHORIZATION commands.
Control-C works to get out of COPY IN state.
Diffstat (limited to 'src/bin/psql/copy.c')
-rw-r--r-- | src/bin/psql/copy.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/bin/psql/copy.c b/src/bin/psql/copy.c index 00664ea05d0..11f66c68978 100644 --- a/src/bin/psql/copy.c +++ b/src/bin/psql/copy.c @@ -3,7 +3,7 @@ * * Copyright 2000 by PostgreSQL Global Development Group * - * $Header: /cvsroot/pgsql/src/bin/psql/copy.c,v 1.29 2003/03/20 06:00:12 momjian Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/copy.c,v 1.30 2003/06/28 00:12:40 tgl Exp $ */ #include "postgres_fe.h" #include "copy.h" @@ -32,8 +32,6 @@ #define S_ISDIR(mode) __S_ISTYPE((mode), S_IFDIR) #endif -bool copy_in_state; - /* * parse_slash_copy * -- parses \copy command line @@ -395,7 +393,7 @@ do_copy(const char *args) return false; } - result = PSQLexec(query.data, false); + result = PSQLexec(query.data, true); termPQExpBuffer(&query); switch (PQresultStatus(result)) @@ -506,10 +504,6 @@ handleCopyIn(PGconn *conn, FILE *copystream, const char *prompt) int ret; unsigned int linecount = 0; -#ifdef USE_ASSERT_CHECKING - assert(copy_in_state); -#endif - if (prompt) /* disable prompt if not interactive */ { if (!isatty(fileno(copystream))) @@ -563,7 +557,6 @@ handleCopyIn(PGconn *conn, FILE *copystream, const char *prompt) linecount++; } ret = !PQendcopy(conn); - copy_in_state = false; pset.lineno += linecount; return ret; } |