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 1pRum9-0004t7-14 for pgsql-hackers@arkaria.postgresql.org; Tue, 14 Feb 2023 12:51:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pRum7-0003qn-Mg for pgsql-hackers@arkaria.postgresql.org; Tue, 14 Feb 2023 12:51:11 +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 1pRum6-0003jF-JA for pgsql-hackers@lists.postgresql.org; Tue, 14 Feb 2023 12:51:11 +0000 Received: from new2-smtp.messagingengine.com ([66.111.4.224]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pRum2-00069O-H2 for pgsql-hackers@postgresql.org; Tue, 14 Feb 2023 12:51:09 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id 2907458208C; Tue, 14 Feb 2023 07:51:05 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Tue, 14 Feb 2023 07:51:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1676379065; x= 1676386265; bh=dV0WOSTHn0WcStsduP4U4oVgXs4FXWsL9TPHn7IcPgE=; b=p 81VvPd57K21sNx8EyTKHw/e9i/sxBP3F+Hr2EVPIyHszfhmdzi23hiv0mpGM9Og8 /5ucy8uCL4dTaqGdP01h94pQaweyQcZWoHx08L8Z0UVMv6YXcXzE4DCKPOMwvmqv 1t0JVKfA8w+/Q8ogVMb3Yydki+PMIe92sU5PJRgbXOftWnI/doVpGZ31n8RzyIql pnJv4YrnVk2QMuJQtFd8ehMmvj0FFPk56UAZT0uVe7Q76h9htQGuBgSrmzuzaPtP wSznwgRzXgDezeh3gmA6kofxZIexsn7IiJ83Ar6IWO5GXQ6mYqNPJo6ISlNTXA+D XUE7Wgc9ysh4xSf3pfpaA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudeifedggeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvghnth gvrhhprhhishgvuggsrdgtohhmqeenucggtffrrghtthgvrhhnpefhjeduueelfeehuedt udefteejveegieeiueejueehfeektddtueeiieeitefhveenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpvghtvghrrdgvihhsvghnthhrrghu thesvghnthgvrhhprhhishgvuggsrdgtohhm X-ME-Proxy: Feedback-ID: i131946ab:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 14 Feb 2023 07:51:04 -0500 (EST) Message-ID: Date: Tue, 14 Feb 2023 13:51:02 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: appendBinaryStringInfo stuff Content-Language: en-US To: Corey Huinker Cc: pgsql-hackers References: <783a4edb-84f9-6df2-7470-2ef5ccc6607a@enterprisedb.com> From: Peter Eisentraut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 10.02.23 20:08, Corey Huinker wrote: > > > On Fri, Feb 10, 2023 at 7:16 AM Peter Eisentraut > > wrote: > > On 19.12.22 07:13, Peter Eisentraut wrote: > > Also, the argument type of appendBinaryStringInfo() is char *. > There is > > some code that uses this function to assemble some kind of packed > binary > > layout, which requires a bunch of casts because of this.  I think > > functions taking binary data plus length should take void * instead, > > like memcpy() for example. > > I found a little follow-up for this one: Make the same change to > pq_sendbytes(), which is a thin wrapper around > appendBinaryStringInfo(). >   This would allow getting rid of further casts at call sites. > > > +1 > > Has all the benefits that 54a177a948b0a773c25c6737d1cc3cc49222a526 had. > > Passes make check-world. committed, thanks