diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-09-16 17:59:02 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-09-16 17:59:02 +0000 |
commit | 7e06dbe1c2391468ddaa7f0805ac6352933069e1 (patch) | |
tree | 1b1825ae1121c1d126f4c5399833b1ac97c8a8aa /src/bin/psql/command.c | |
parent | 7b05ef5b63bb91eff2433e5eb187b0eb5a81653e (diff) | |
download | postgresql-7e06dbe1c2391468ddaa7f0805ac6352933069e1.tar.gz postgresql-7e06dbe1c2391468ddaa7f0805ac6352933069e1.zip |
Make psql correctly track the effects of SET CLIENT_ENCODING commands.
I thought I'd fixed this earlier, but I didn't get it right ...
Diffstat (limited to 'src/bin/psql/command.c')
-rw-r--r-- | src/bin/psql/command.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c index 7e668e883bf..9650b15fa3a 100644 --- a/src/bin/psql/command.c +++ b/src/bin/psql/command.c @@ -3,7 +3,7 @@ * * Copyright (c) 2000-2003, PostgreSQL Global Development Group * - * $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.101 2003/08/04 23:59:39 tgl Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.102 2003/09/16 17:59:02 tgl Exp $ */ #include "postgres_fe.h" #include "command.h" @@ -458,15 +458,7 @@ exec_command(const char *cmd, if (!encoding) { - /* show encoding --- first check for change sent from server */ - if (pset.encoding != PQclientEncoding(pset.db) && - PQclientEncoding(pset.db) >= 0) - { - pset.encoding = PQclientEncoding(pset.db); - pset.popt.topt.encoding = pset.encoding; - SetVariable(pset.vars, "ENCODING", - pg_encoding_to_char(pset.encoding)); - } + /* show encoding */ puts(pg_encoding_to_char(pset.encoding)); } else |