Fra*_*ein 16 sql postgresql command-line character-encoding psql
我在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建立连接吗?可能吗?
Fra*_*ein 55
非常感谢Craig Ringer,作品,终于有效了!你现在是我的新偶像!
步骤是: