1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-03 20:02:46 +03:00

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.
This commit is contained in:
Peter Eisentraut
2003-03-18 22:15:44 +00:00
parent 9384dc6e59
commit cf1cf89649
10 changed files with 88 additions and 89 deletions

View File

@ -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));