Re: Does pgAgent support chinese, japanese characters? - Mailing list pgsql-general

From a
Subject Re: Does pgAgent support chinese, japanese characters?
Date
Msg-id tencent_0A9BB3CE40FEEC222977EFBA@qq.com
Whole thread Raw
In response to Re: Does pgAgent support chinese, japanese characters?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Thanks a lot for your reply.

I tried to set the host/client encoding, however, when I create new tables using Chinese, it reported an encoding error...... also with other queries..... 

May I ask encoding of pgAgent? May it reading from a text file? Or I can use notepad++ to convert and then copy??


------------------ Original ------------------
From: "Tom Lane";
Date: Tuesday, Jun 12, 2018 9:59 PM
To: "a"<372660931@qq.com>;
Cc: "pgsql-general";
Subject: Re: Does pgAgent support chinese, japanese characters?

"a" <372660931@qq.com> writes:
> Hi I'm using pgAgent to set up daily or monthly tasks.
> I have tables that with the name of Chinese or Japanese. It runs ok in normal sql script, but report non-recognizable in pgAgent SQL jobs.

First guess is that client_encoding is getting set differently in the
pgAgent-initiated sessions than elsewhere, causing incorrect character set
conversions to happen.

> I'm using windows server 2008, pgsql 10, and pgAgent 3.4, may there be a way of supporting different languages??

... unfortunately, I don't know anything about how to adjust that
in Windows.  A brute-force way would be to issue "set client_encoding"
in your scripts, but there may be a better way.

regards, tom lane

pgsql-general by date:

Previous
From: Andres Freund
Date:
Subject: Re: Print pg_lsn as a number?
Next
From: Laurenz Albe
Date:
Subject: Re: Logging