Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fSjpo-0005ml-6b for pgsql-general@arkaria.postgresql.org; Tue, 12 Jun 2018 13:59:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fSjpm-0002pm-6B for pgsql-general@arkaria.postgresql.org; Tue, 12 Jun 2018 13:59:42 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fSjpl-0002pc-Ul for pgsql-general@lists.postgresql.org; Tue, 12 Jun 2018 13:59:41 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fSjpi-0004z6-II for pgsql-general@postgresql.org; Tue, 12 Jun 2018 13:59:41 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w5CDxZQK027963; Tue, 12 Jun 2018 09:59:36 -0400 From: Tom Lane To: "=?ISO-8859-1?B?YQ==?=" <372660931@qq.com> cc: "=?ISO-8859-1?B?cGdzcWwtZ2VuZXJhbA==?=" Subject: Re: Does pgAgent support chinese, japanese characters? In-reply-to: References: Comments: In-reply-to "=?ISO-8859-1?B?YQ==?=" <372660931@qq.com> message dated "Tue, 12 Jun 2018 16:02:43 +0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <27961.1528811975.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 12 Jun 2018 09:59:35 -0400 Message-ID: <27962.1528811975@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk "=3D?ISO-8859-1?B?YQ=3D=3D?=3D" <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 n= ormal 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