Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l6lpC-0007dc-1m for pgsql-general@arkaria.postgresql.org; Tue, 02 Feb 2021 02:53:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l6lp9-00026M-IK for pgsql-general@arkaria.postgresql.org; Tue, 02 Feb 2021 02:53:51 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l6lp9-00026E-AM for pgsql-general@lists.postgresql.org; Tue, 02 Feb 2021 02:53:51 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l6lp6-0002j5-Dk for pgsql-general@lists.postgresql.org; Tue, 02 Feb 2021 02:53:49 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 1122rjjV3597101; Mon, 1 Feb 2021 21:53:45 -0500 From: Tom Lane To: rob stone cc: =?UTF-8?Q?Ji=C5=99=C3=AD_Pavlovsk=C3=BD?= , pgsql-general@lists.postgresql.org Subject: Re: libpq and mysterious "invalid byte sequence for encoding UTF8". In-reply-to: <23edd5119fad0d4fc358123a51a0158b05fabb8b.camel@gmail.com> References: <8b88f867-d0d0-6deb-8f13-48853a57080a@pavlovsky.eu> <3335118.1612191322@sss.pgh.pa.us> <8c67bf16-e267-a40c-25da-ebc646d0753d@pavlovsky.eu> <23edd5119fad0d4fc358123a51a0158b05fabb8b.camel@gmail.com> Comments: In-reply-to rob stone message dated "Tue, 02 Feb 2021 12:52:05 +1100" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <3597099.1612234425.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Mon, 01 Feb 2021 21:53:45 -0500 Message-ID: <3597100.1612234425@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk rob stone writes: > Columns:- maincontact boolean DEFAULT false, > publdatacontact boolean DEFAULT false, > invcontact boolean DEFAULT false, > queries_recipient boolean, > fakelastname boolean NOT NULL DEFAULT false, > are defined as booleans and all except one have defaults declared, yet > you are passing NULL's which the insert tries to cast to boolean. > Maybe this is the cause of the error?? Oooh ... if we posit that the statement is expected to throw an error, maybe what this error is complaining about is an inability to translate a localized error message to the client's encoding. This could reflect an incorrectly-encoded .po file, for example. So what we need to know next is what lc_messages setting Jiří is using, and also the server and client encodings. regards, tom lane