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 1jakCD-0006hR-Vg for pgsql-hackers@arkaria.postgresql.org; Mon, 18 May 2020 18:09:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jakCC-0002CW-HK for pgsql-hackers@arkaria.postgresql.org; Mon, 18 May 2020 18:09:00 +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 1jakCC-00028T-A3 for pgsql-hackers@lists.postgresql.org; Mon, 18 May 2020 18:09:00 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jakCA-0005mF-Ax for pgsql-hackers@postgresql.org; Mon, 18 May 2020 18:08:59 +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 04II8rhJ002880; Mon, 18 May 2020 14:08:53 -0400 From: Tom Lane To: Ranier Vilela cc: Andres Freund , David Fetter , Jeff Janes , pgsql-hackers Subject: Re: Why is pq_begintypsend so slow? In-reply-to: References: <31795.1578773977@sss.pgh.pa.us> <20200112014107.GC32763@fetter.org> <5450.1578797036@sss.pgh.pa.us> <28764.1578799965@sss.pgh.pa.us> <20200113231804.4zqjzggv3te2eo63@alap3.anarazel.de> <20200114224520.gh4qktr5kuhu5pyi@alap3.anarazel.de> <6648.1589819885@sss.pgh.pa.us> Comments: In-reply-to Ranier Vilela message dated "Mon, 18 May 2020 14:54:03 -0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2878.1589825333.1@sss.pgh.pa.us> Date: Mon, 18 May 2020 14:08:53 -0400 Message-ID: <2879.1589825333@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Ranier Vilela writes: > Again, I see problems with the types declared in Postgres. > 1. pq_sendint32 (StringInfo buf, uint32 i) > 2. extern void pq_sendbytes (StringInfo buf, const char * data, int > datalen); We could spend the next ten years cleaning up minor discrepancies like that, and have nothing much to show for the work. > To avoid converting from (int) to (uint32), even if afterwards there is a > conversion from (uint32) to (int)? You do realize that that conversion costs nothing? regards, tom lane