简体   繁体   English

psql:致命错误:参数“ client_encoding”的无效值:“ WIN1252”

[英]psql: FATAL: invalid value for parameter “client_encoding”: “WIN1252”

I am using psql with Redshift. 我在Redshift中使用psql。 Unfortunately, Redshift is uses PostgreSQL 8.0.2. 不幸的是,Redshift使用的是PostgreSQL 8.0.2。 So when I downloaded the latest version of PostgreSQL (9.6.1) and try logging into a database, I get the error: 因此,当我下载最新版本的PostgreSQL(9.6.1)并尝试登录数据库时,出现错误:

cannot connect from psql due to invalid parameter "client_encoding"

Instructions here https://forums.aws.amazon.com/thread.jspa?messageID=529120 suggest 此处的指示https://forums.aws.amazon.com/thread.jspa?messageID=529120建议

set PGCLIENTENCODING=UTF8

But when I open SQL Shell (psql) in Windows, I am never given the chance to enter this command: 但是,当我在Windows中打开SQL Shell(psql)时,再也没有机会输入以下命令:

在此处输入图片说明

How can I bridge this gap/fix this error? 如何弥合此差距/解决此错误? Thanks 谢谢

set x=y is the Windows CMD syntax to set an environment variable , just as x=y;export x or export x=y or setenv xy is on most Unix shells. set x=y是Windows CMD语法来设置环境变量 ,就像x=y;export x大多数Unix shell上都使用x=y;export xexport x=ysetenv xy

You can pre-set a (semi)permanent env var in Windows from ControlPanel / System (or ThisPC rightclick Properties), AdvancedSystemSettings, Advanced tab, EnvironmentVariables button. 您可以在Windows中通过ControlPanel /系统(或ThisPC右键单击“属性”),“ AdvancedSystemSettings”,“高级”选项卡,“ EnvironmentVariables”按钮预先设置一个(半)永久环境。 Or from CMD with the SETX command; 或使用SETX命令从CMD获得; SETX /? for help or http://ss64.com/nt/setx.html . 寻求帮助或http://ss64.com/nt/setx.html (Or directly in the registry, but if you have enough skill to use regedit safely you wouldn't ask this Q.) (或者直接在注册表中,但是如果您有足够的技能安全地使用regedit,则不会问这个问题。)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 SQL 外壳。 client_encoding 未正确显示“UTF8”或“WIN1252” - SQL SHELL. client_encoding not displaying properly 'UTF8' or 'WIN1252' Symfony 4,Postgres-运行学说命令时,参数“ client_encoding”的无效值:“ utf8mb4” - Symfony 4, Postgres - `Invalid value for parameter “client_encoding”: “utf8mb4”` on running doctrine command SSIS错误“ UTF8”在编码“ WIN1252”中没有等效项 - SSIS error “UTF8” has no equivalant in encoding “WIN1252” 编码为 UTF8 的字符在 WIN1252 中没有等价物 - Character with encoding UTF8 has no equivalent in WIN1252 Postgres:具有字节序列编码“ UTF8”的字符在WIN1252中没有等效的编码 - Postgres :character with Byte sequence in encoding “UTF8” has no equivalent encoding in WIN1252 编码“WIN1252”中字节序列为 0x9d 的字符在编码“UTF8”中没有等效项 - Character with byte sequence 0x9d in encoding 'WIN1252' has no equivalent in encoding 'UTF8' 错误:在加载备份时,编码“WIN1252”中字节序列为 0x9d 的字符在编码“UTF8”时没有等效项 - ERROR: character with byte sequence 0x9d in encoding “WIN1252” has no equivalent in encoding “UTF8” while loading backup Postgres ERROR "UTF8" 中的编码问题 最好将编码设置为 UTF8 还是使数据与 WIN1252 兼容? - Encoding issue in Postgres ERROR “UTF8” is it best to set encoding to UTF8 or to make the data WIN1252 compatible? 如何设置 Client_Encoding - How to set Client_Encoding PostgreSQL:编码“UTF8”中字节序列为0xc2 0x81的字符在编码“WIN1252”中没有等价物 - PostgreSQL: character with byte sequence 0xc2 0x81 in encoding "UTF8" has no equivalent in encoding "WIN1252"
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM