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 1g5HZ5-0006Ul-Va for pgsql-hackers@arkaria.postgresql.org; Wed, 26 Sep 2018 21:41:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g5HZ3-0001RZ-LK for pgsql-hackers@arkaria.postgresql.org; Wed, 26 Sep 2018 21:41:45 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g5HZ3-0001RR-A8 for pgsql-hackers@lists.postgresql.org; Wed, 26 Sep 2018 21:41:45 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g5HZ0-0003nm-E1 for pgsql-hackers@lists.postgresql.org; Wed, 26 Sep 2018 21:41:43 +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 w8QLfaN2025502; Wed, 26 Sep 2018 17:41:36 -0400 From: Tom Lane To: Andres Freund cc: Michael Paquier , Thomas Munro , Alvaro Herrera , PostgreSQL Hackers Subject: Re: Allowing printf("%m") only where it actually works In-reply-to: <20180926174645.nsyj77lx2mvtz4kx@alap3.anarazel.de> References: <8770.1533931511@sss.pgh.pa.us> <16896.1533935042@sss.pgh.pa.us> <14925.1534040609@sss.pgh.pa.us> <1437.1534100930@sss.pgh.pa.us> <13183.1534624490@sss.pgh.pa.us> <30022.1534705920@sss.pgh.pa.us> <20180912070739.GK25160@paquier.xyz> <1304.1536774001@sss.pgh.pa.us> <20180914020256.GD29332@paquier.xyz> <13585.1537809527@sss.pgh.pa.us> <20180926174645.nsyj77lx2mvtz4kx@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Wed, 26 Sep 2018 10:46:45 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <25500.1537998096.1@sss.pgh.pa.us> Date: Wed, 26 Sep 2018 17:41:36 -0400 Message-ID: <25501.1537998096@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andres Freund writes: > I'm not saying we shouldn't default to our printf - in fact I think we > probably past due to use a faster float->string conversion than we > portably get from the OS - but I don't think we can default to our > sprintf without doing something about the float conversion performance. Well, if you're unhappy about snprintf.c's performance, you could review https://commitfest.postgresql.org/19/1763/ so I can push that. In my tests, that got us down to circa 10% penalty for float conversions. More generally, I'm not averse to having our own float conversion code if someone wants to put in the effort. Performance aside, it'd be nice to eliminate cross-platform differences in float output so we could get rid of some of the Windows-specific regression result files. regards, tom lane