aboutsummaryrefslogtreecommitdiff
path: root/src/bin/psql/command.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2003-03-18 22:15:44 +0000
committerPeter Eisentraut <peter_e@gmx.net>2003-03-18 22:15:44 +0000
commitcf1cf8964925cd36dc7bf034a968a4e44ede382a (patch)
treef80bcdd31d3af6f1783ea382e277130db22d6093 /src/bin/psql/command.c
parent9384dc6e597baf53d3aa07343163ec7011e6181a (diff)
downloadpostgresql-cf1cf8964925cd36dc7bf034a968a4e44ede382a.tar.gz
postgresql-cf1cf8964925cd36dc7bf034a968a4e44ede382a.zip
Make the printing code somewhat more independent by not relying on
functions and global variables from the rest of psql. Also clean up some data type mismatches created by the last pager patch.
Diffstat (limited to 'src/bin/psql/command.c')
-rw-r--r--src/bin/psql/command.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c
index feb6ba32a90..66a8553e212 100644
--- a/src/bin/psql/command.c
+++ b/src/bin/psql/command.c
@@ -3,7 +3,7 @@
*
* Copyright 2000-2002 by PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.91 2003/03/10 15:46:01 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.92 2003/03/18 22:15:43 petere Exp $
*/
#include "postgres_fe.h"
#include "command.h"
@@ -471,6 +471,7 @@ exec_command(const char *cmd,
{
/* save encoding info into psql internal data */
pset.encoding = PQclientEncoding(pset.db);
+ pset.popt.topt.encoding = PQclientEncoding(pset.db);
SetVariable(pset.vars, "ENCODING", pg_encoding_to_char(pset.encoding));
}
free(encoding);
@@ -1445,6 +1446,7 @@ do_connect(const char *new_dbname, const char *new_user)
PQsetNoticeProcessor(pset.db, NoticeProcessor, NULL);
pset.encoding = PQclientEncoding(pset.db);
+ pset.popt.topt.encoding = PQclientEncoding(pset.db);
/* Update variables */
SetVariable(pset.vars, "DBNAME", PQdb(pset.db));