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 1gl0tU-0002sG-HS for pgsql-hackers@arkaria.postgresql.org; Sun, 20 Jan 2019 00:23:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gl0tT-0000Zn-46 for pgsql-hackers@arkaria.postgresql.org; Sun, 20 Jan 2019 00:23:19 +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 1gl0tS-0000Zg-Q2 for pgsql-hackers@lists.postgresql.org; Sun, 20 Jan 2019 00:23:18 +0000 Received: from mout.kundenserver.de ([217.72.192.75]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gl0tQ-00011I-4I for pgsql-hackers@lists.postgresql.org; Sun, 20 Jan 2019 00:23:17 +0000 Received: from feivel.credativ.lan ([50.234.0.119]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1N7AEs-1hIyhv1rbw-017SNF; Sun, 20 Jan 2019 01:23:11 +0100 Received: from localhost (localhost [127.0.0.1]) by feivel.credativ.lan (Postfix) with ESMTP id AFD57E007F; Sun, 20 Jan 2019 01:23:07 +0100 (CET) Message-ID: <907962be808367ff475893ce07a8442700e3e65a.camel@postgresql.org> Subject: Re: Thread-unsafe coding in ecpg From: Michael Meskes To: Tom Lane Cc: pgsql-hackers@lists.postgresql.org Date: Sun, 20 Jan 2019 01:23:07 +0100 In-Reply-To: <23046.1547943059@sss.pgh.pa.us> References: <31420.1547783697@sss.pgh.pa.us> <0be2e83c4dec0d2f1f8eb55b1e95ad98b12ede24.camel@postgresql.org> <23046.1547943059@sss.pgh.pa.us> Organization: PostgreSQL Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.4-1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:ycgsCarpOgurYzv4dfnq6ndeI3gviPW8WiBf7qWoHznuv1rqof8 5FkJTqUg+l6Q/44r223c4qFTyijuY0nm3k7rBXtKy/GBhgkMEPwBTJ75SotmIiYl9z2/Ks1 vh5OaPZ4ctt3dqcSCwEosxAYA+SJ2pUP5GDBxjtfha1zzmSYBJqy5xe8of1quMlgMXUO8sC IssJt2BV7A/4TvHePVqZA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:lveemDZdKis=:ZAgidiBcTc+gDOKQr9qB9O nVqlmA+sks4DdevjsrDD8DX74j0D5XYUCjo0qTgqD99dq/dpGEf0aRAqrERAxB66lKprTvJbI 4ofOo7tPStUEGWlT3ZZhqPrxZOZnMAXwUVyzKpcuML1Ea0BSMV2llX8/V3l2F4XDuP1rLbFp5 yYRIqdKS+HQX8y0Rq9JrlJr3YQCp2uDjtZ0KXoAwo5NkQaKKcgyWDw2A4CdeyD46+TOOVViG7 GzisEbQl3wgJ/MPlu5fGkB5qHGOqkbl54LPX1hiLjTH7GwDMyyCsvRDqFvaKEquuqLnQPfnng 9TtscHTkUZtp8Zgp47mZUvz07ZIRXT9IchaNcF5Up3pjKKSBAFAQ4HbtPaAgnRGAp/ggT+rwN O7nMI9+tZcdaW1kjLdFx+rQkE02vjFb1B2bJQV5H4mqUHNxygze/aaDwrIAi6xf22Qkz5iyYw Ac8w+A+UbLU5M2ac0XD6DP1aizeLKjYoJTTGHGO4ffpgogv1FTbI/qONcJ1gzB/DZgrU4MCcW NaElXeg16kbayKVQfN89HGGGCLUap/M5sWsebB1Sr0p6ydH+A4fwpPcePuKTwOvQpwkFvNd4m TBzmKFzyAbdqLelkWvQ/4t44MqiilKHG5VVoPi+ldA8LTGo9Th2xAkN3vV+SMmgDyx7RLuvCN poKr5+6CXek98Fe4+qe0/mQnnKF/3p8FrlButPdojrh0WkXfdrFjqrge5uINj9d1Cq78dR29t 1EdhnZ89O/PXJTdEyq7q85LlHRVUt+YASOTCsw7VsOt9qrJrd3bZRL/2wI0= List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > While (b) has more theoretical purity, I'm inclined to think it > doesn't really improve anybody's life compared to (a), because > --disable-thread-safety doesn't actually stop anyone from using > libpq or ecpglib in threaded environments. It just makes it > more likely to fail when they do. The question is, what do we do on those platforms? Use setlocale() or fallback to (a) and document that ecpg has to run in a C locale? We could also rewrite the parsing of numbers to not be locale dependent. Michael -- Michael Meskes Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org) Meskes at (Debian|Postgresql) dot Org Jabber: michael at xmpp dot meskes dot org VfL Borussia! Força Barça! SF 49ers! Use Debian GNU/Linux, PostgreSQL