Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ieMnN-0001Hb-FS for pgsql-hackers@arkaria.postgresql.org; Mon, 09 Dec 2019 17:26:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ieMnM-0006Yd-8j for pgsql-hackers@arkaria.postgresql.org; Mon, 09 Dec 2019 17:26:04 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ieMnL-0006YW-Se for pgsql-hackers@lists.postgresql.org; Mon, 09 Dec 2019 17:26:04 +0000 Received: from mail-vk1-xa41.google.com ([2607:f8b0:4864:20::a41]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ieMnI-0007nc-Uu for pgsql-hackers@postgresql.org; Mon, 09 Dec 2019 17:26:02 +0000 Received: by mail-vk1-xa41.google.com with SMTP id o187so4658984vka.2 for ; Mon, 09 Dec 2019 09:26:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=tezYIuo8PnFLrR6+DRQHHrQxHgsbTwU4FWlzIuAP36g=; b=ipkHk0MlGJcCFFIfXzN1dnvml8SBHEzxv2VV3R3jSnqQrb8YoIjdW/7kbydfSK0Vlb CfNmNS4uWa0B+NQC7uAUMcrjs9OjXu8rANV1IL5I5IwawPBBMnaPjy5UQd7bwmqu9Ch4 Km/B6DZ55RRQnNLblCgdp0AdZRbwUKDZp//tRn74nbMJPrK7tKnO18nvWlIUXzbiUCBk RLCOPqs4nYd92GgflFCa7El0dL5q6oxqeOMG8tP/nMVSsScXx8UH43S1sJLT8XQzcp9p SR49rA4g7727NPpXpeyGd2V1prYtdHBVB56+yfviYru8r27mKrAXU3m5E9r9B4IsVaw9 kqUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=tezYIuo8PnFLrR6+DRQHHrQxHgsbTwU4FWlzIuAP36g=; b=aGXf52HNxQqZkbErte5Wjv6A4gGvtfi0j21GldRoEMYgX136DCDSX9jfykUV1cLEaz lQcDY53qKWqPbSu+qIzP+CRe67yEpyZdVGXCeEDGyb3SDh2IGOawT/KGrUtAhtrI1+5e il2b5NqpS04PShSDvUKafwwcoD+8UF2rIja8SnO4S0FSRIGvzBobcHOEWS1DByj4obfX K2DmxbUiu6DI3jDx3ny7tlpyk7vXZqOKhCNq8wWdb1CzOEhJ40nZuVYrLTrB7fjDquxh 3/kJyS/C+qu36fWi0yHqjp+uIKaQ9R5IzILc+snYCWsphfdHcH7/Pgbn3PvZkOe6IMjd CVhw== X-Gm-Message-State: APjAAAUX0PNdo3+N/He/sE0RoCiTFxpxkpRRxAgc8l6sz42SUF3OTrNZ 5ODovnpAAdzoEkGt8SwOQVuVw36lIvDp7w== X-Google-Smtp-Source: APXvYqyA3OopJkggeuSAeZoXqiWYcSA7V4ZZc2+kG0mGHLbtwrZntxn/n9XZdhKNyQ+23H8mY+mVFA== X-Received: by 2002:a1f:3fcd:: with SMTP id m196mr24755472vka.28.1575912359732; Mon, 09 Dec 2019 09:25:59 -0800 (PST) Received: from nimloth.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id b1sm372509vkk.33.2019.12.09.09.25.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Dec 2019 09:25:59 -0800 (PST) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 782113008E7; Mon, 9 Dec 2019 14:25:55 -0300 (-03) Date: Mon, 9 Dec 2019 14:25:55 -0300 From: Alvaro Herrera To: Tom Lane Cc: Andres Freund , Alexey Bashtanov , Peter Eisentraut , PostgreSQL Hackers Subject: Re: log bind parameter values on error Message-ID: <20191209172555.GA9412@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20191209170225.GA26084@alvherre.pgsql> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Dec-09, Alvaro Herrera wrote: > I see four possible ways forward, with nuances. In order of preference: > > 1. change enough of the build system so that pg_encoding_mbcliplen is > available. (Offhand I see no reason why we couldn't move the > function from mbutils.c to wchar.c, but I haven't tried.) Ah, this seems to require putting encnames.o and wchar.o in src/common's Makefile and moving pg_encoding_mbcliplen() from mbutils.c to wchar.c. Fairly simple. (There's a little bit of additional fallout because libpq also has encnames/wchar in its roster, but I think this means we can just remove them from there and let them be acquired via libpgcommon.) -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services