相关疑难解决方法(0)

PostgreSQL:使用psql命令行实用程序时在Windows上编码问题

我在Windows 2008 R2上的集中监控系统中工作,我已经安装了PostgreSQL 9.3以从命令行使用psql.

当我尝试访问一些远程Postgres(在我的主要情况下为8.4)时,我遇到编码错误:

命令:

psql.exe -h 192.168.114.12 -p 5432 -d db_seros_transaccion -U postgres -f script.sql
Run Code Online (Sandbox Code Playgroud)

错误:

psql: FATAL:  la conversión entre WIN1252 y LATIN1 no está soportada
Run Code Online (Sandbox Code Playgroud)

我尝试添加句子

SET client_encoding = 'UTF8';
Run Code Online (Sandbox Code Playgroud)

在我的脚本中但问题仍然存在(以及其他编码,如LATIN1和WIN1252).

谷歌搜索后,我发现人们更新服务器中的某些行来建立连接,这对我来说是一个问题.

任何人都可以帮我在没有更新的情况下使用psql建立连接吗?可能吗?

sql postgresql command-line character-encoding psql

16
推荐指数
1
解决办法
3万
查看次数

标签 统计

character-encoding ×1

command-line ×1

postgresql ×1

psql ×1

sql ×1