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:
@ -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));
|
||||
|
Reference in New Issue
Block a user