aboutsummaryrefslogtreecommitdiff
path: root/src/bin/psql/copy.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-08-29 15:19:51 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-08-29 15:19:51 +0000
commit0434c46db059a80b0e89397a137dfa10421573f4 (patch)
tree43f7d6fd2e7a47c1d243ff1cb55f8df06a75b1ba /src/bin/psql/copy.c
parentb681bfdd59918e3b65bd0b499075f99b39e511b5 (diff)
downloadpostgresql-0434c46db059a80b0e89397a137dfa10421573f4.tar.gz
postgresql-0434c46db059a80b0e89397a137dfa10421573f4.zip
Invent an assign-hook mechanism for psql variables similar to the one
existing for backend GUC variables, and use this to eliminate repeated fetching/parsing of psql variables in psql's inner loops. In a trivial test with lots of 'select 1;' commands, psql's CPU time went down almost 10%, although of course the effect on total elapsed time was much less. Per discussion about how to ensure the upcoming FETCH_COUNT patch doesn't cost any performance when not being used.
Diffstat (limited to 'src/bin/psql/copy.c')
-rw-r--r--src/bin/psql/copy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/psql/copy.c b/src/bin/psql/copy.c
index 2ec01af186b..0d7cb5b4e00 100644
--- a/src/bin/psql/copy.c
+++ b/src/bin/psql/copy.c
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2006, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/psql/copy.c,v 1.66 2006/06/14 16:49:02 tgl Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/copy.c,v 1.67 2006/08/29 15:19:50 tgl Exp $
*/
#include "postgres_fe.h"
#include "copy.h"
@@ -704,7 +704,7 @@ handleCopyIn(PGconn *conn, FILE *copystream, bool isbinary)
/* Prompt if interactive input */
if (isatty(fileno(copystream)))
{
- if (!QUIET())
+ if (!pset.quiet)
puts(_("Enter data to be copied followed by a newline.\n"
"End with a backslash and a period on a line by itself."));
prompt = get_prompt(PROMPT_COPY);