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 1l6krY-0004s7-SH for pgsql-general@arkaria.postgresql.org; Tue, 02 Feb 2021 01:52:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l6krX-0005KC-Ru for pgsql-general@arkaria.postgresql.org; Tue, 02 Feb 2021 01:52:15 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l6krX-0005Ju-Ha for pgsql-general@lists.postgresql.org; Tue, 02 Feb 2021 01:52:15 +0000 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1l6krV-0003k7-Cw for pgsql-general@lists.postgresql.org; Tue, 02 Feb 2021 01:52:15 +0000 Received: by mail-pg1-x529.google.com with SMTP id o63so13824043pgo.6 for ; Mon, 01 Feb 2021 17:52:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=H0ACmZj83Jgj8YANRNteIqomr/DX8hTx9j2RTYn4zig=; b=gCTjVnJzsebjG2/YRs5Q6tFkn1YBDdXXVTW0N0k69fWyNuDbMPV4HmswcpOAyURDzC uQpN5vTpx0BnS9jFemysB0QgNXlke45bYhL/wa+O7j1hUIsKuh02dFS9kQ30Q+IjXra4 RJ1KfDyK2YE90wpL7U00vhVNFNbuZKhzXU7sPWdoFbJCF5rLrlW0po/k4pUvzqqXdAef 5q8veR55LJ8jUvnN5NoilkiBJCt71Ge0Z+7QNlDtZeIz6hM0OOTHsonl+hQdOmUGmP3L toxO3NWr/cmlOGGKnQRvx8jK+XXyGexFMUhLrKL+RP0yVRZEU9ymQYSyKOz1kUWREj7V ix+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=H0ACmZj83Jgj8YANRNteIqomr/DX8hTx9j2RTYn4zig=; b=YdggTnlpg/xyk+yW9tYOLUJhIrq5rvnJses3enfZHFTAZESuT0IZu6ceE6awiSGgkg rUutD7fZExGGaXGIAze4k2HbtPT1TRx0qymT/zzzAngnhWxvuKdCPwm/XjP/8p3zZ4sW kkVBv9ghg3tsTDRRMF5plsql0C8ykPlApVfdRa2irmjaUHxr61citj/sxsfpEXcXzsN8 MAj//bmsuFn+iG1gHIODAtCOxWXt1Uq4U87cNdon3PVMm2lVq9NQhG88lZkECmpTFfvY xbh0mEfeT308avCtz/SjSPU+9n8PIe1QOFwvQYFCRyVAOHBOTwcpGj1h4NOEnB+ty7+W jDfw== X-Gm-Message-State: AOAM5304UZCvqxofl0LBEFqQ9G++opdYJPBAdUdUIdiTNaCpvrXoUL9v vq7jGfSlSUKx57BNIa0f3Qg= X-Google-Smtp-Source: ABdhPJxTqvN1QZcu0niNNF0tmpNv1ukBYew5opQMnTUKawpU6MnRzxzQQ0vdYklArCpZHC55iZVqBg== X-Received: by 2002:aa7:978e:0:b029:1bd:f965:66dd with SMTP id o14-20020aa7978e0000b02901bdf96566ddmr19171211pfp.46.1612230730641; Mon, 01 Feb 2021 17:52:10 -0800 (PST) Received: from [192.168.1.101] (59-102-52-160.tpgi.com.au. [59.102.52.160]) by smtp.gmail.com with ESMTPSA id j14sm10194445pgn.25.2021.02.01.17.52.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Feb 2021 17:52:10 -0800 (PST) Message-ID: <23edd5119fad0d4fc358123a51a0158b05fabb8b.camel@gmail.com> Subject: Re: libpq and mysterious "invalid byte sequence for encoding UTF8". From: rob stone To: =?UTF-8?Q?Ji=C5=99=C3=AD_Pavlovsk=C3=BD?= , Tom Lane Cc: pgsql-general@lists.postgresql.org Date: Tue, 02 Feb 2021 12:52:05 +1100 In-Reply-To: <8c67bf16-e267-a40c-25da-ebc646d0753d@pavlovsky.eu> References: <8b88f867-d0d0-6deb-8f13-48853a57080a@pavlovsky.eu> <3335118.1612191322@sss.pgh.pa.us> <8c67bf16-e267-a40c-25da-ebc646d0753d@pavlovsky.eu> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.2-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hello, On Mon, 2021-02-01 at 18:03 +0100, Jiří Pavlovský wrote: > > > Thanks for the answer. > > > I don't think triggers or constraints are the issue. > > The exact same code works if I create a small test program with the > same > query and the same parameters. > > But when used in the context of the whole application it gives the > error. > >   I don't know what should I try. I tried all possible combinations > of > parameters. > > I have just even tried to disable triggers and remove any constraints > from the table. Same error. > 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?? My 2 cents worth.