Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rV3Ka-00EYq3-7G for pgsql-hackers@arkaria.postgresql.org; Wed, 31 Jan 2024 05:40:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rV3KZ-00Ba4v-1B for pgsql-hackers@arkaria.postgresql.org; Wed, 31 Jan 2024 05:40:15 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rV3KX-00Ba4l-5S for pgsql-hackers@lists.postgresql.org; Wed, 31 Jan 2024 05:40:14 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rV3KT-004erJ-6u for pgsql-hackers@postgresql.org; Wed, 31 Jan 2024 05:40:12 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 8F1E85C00EE; Wed, 31 Jan 2024 00:40:06 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 31 Jan 2024 00:40:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1706679606; x=1706766006; bh=Qz701P3P0f j4wwZY8xeUqKUwsG6QnePSih5pCBFmt8c=; b=FZLTC5fH7cf8MklCIBSfc/wFgL ag2izmIycdcDBwQ8aMTbFQG7yEdf3G19uWAj+/3LcKc1i2UbO93okQqWH9j9FXiK BzSNzFjkubHEEVnvsQZ6j8Ih14qdWuoPF6GyO5m+gujbFE3+LpE/MOoliGnyy+9t Xs/NLOc8noy6JLrIWYzviouBrAm41p5rr2I05uxdte2JWdytUzRHWz/Gi3/UJq0a zQlZdDQ8RLeJiOPuZjSEp274ceI3xFjJaDP1w6ObDvgdnFy6WkTZE+8GhIaveBHB neaJZXWiyvo5BeFLYNItllr1/ZtvZKP0fThf6bVEi71icEtO9CnUShBrIrzg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1706679606; x=1706766006; bh=Qz701P3P0fj4wwZY8xeUqKUwsG6Q nePSih5pCBFmt8c=; b=ybr8IovIfWQt+2Mvg8WjQBx1W6lnpEw3mXdllRBv7Yu2 k0G5Ka5A53ueGpMJUn1fwDaArz3S/owZvzKxvU2LgPDgeZJzolK7PLBzpkqD7UAw RbPufOqapA1tLS+hQhqv3B92a8ADH96wxazBBEdEqhKD14VjtKWP5GJwz0inZQuv Zr7Y8PQXlmPgZ7cMKi2v4NhOMY5gpl6HHBBqbVBiS1F22NLawF6ZP0mJryToP9F8 bIg5GlCLglynyZTWWpskIOtisHvGbzBVhy39mqFpjg/vKk42K0Y9dawSDSq4sO4A IZrEpklP39FmLEgEgPdN8b2/GhTrTEjg0BVCf5gKZg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrfedtkedgkeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdljedtmdenucfjughrpeffhf fvvefukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfrrghq uhhivghruceomhhitghhrggvlhesphgrqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvg hrnhepteelieefudffhffhtdetleeggeegfffhkeeuveetiefgudduvedutefggeeivdej necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhhitg hhrggvlhesphgrqhhuihgvrhdrgiihii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 31 Jan 2024 00:40:04 -0500 (EST) Date: Wed, 31 Jan 2024 14:39:54 +0900 From: Michael Paquier To: Sutou Kouhei Cc: sawada.mshk@gmail.com, zhjwpku@gmail.com, andrew@dunslane.net, nathandbossart@gmail.com, pgsql-hackers@postgresql.org Subject: Re: Make COPY format extendable: Extract COPY TO format implementations Message-ID: References: <20240130.171511.2014195814665030502.kou@clear-code.com> <20240131.141122.279551156957581322.kou@clear-code.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="cJg5hbLOUpdhvoB2" Content-Disposition: inline In-Reply-To: <20240131.141122.279551156957581322.kou@clear-code.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --cJg5hbLOUpdhvoB2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Jan 31, 2024 at 02:11:22PM +0900, Sutou Kouhei wrote: > Ah, yes. defel->location is used in later patches. For > example, it's used when a COPY handler for the specified > FORMAT isn't found. I see. > I've prepared the v10 patch set. Could you try this? Thanks, I'm looking into that now. > FYI: Here are Copy{From,To}Routine in the v10 patch set. I > think that only Copy{From,To}OneRow are minimal callbacks > for the performance gain. But can we keep Copy{From,To}Start > and Copy{From,To}End for consistency? We can remove a few > {csv_mode,binary} conditions by Copy{From,To}{Start,End}. It > doesn't depend on the number of COPY target tuples. So they > will not affect performance. I think I'm OK to keep the start/end callbacks. This makes the code more consistent as a whole, as well. -- Michael --cJg5hbLOUpdhvoB2 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmW53SoACgkQnvQgOdby QH1MYBAAiPBM+YHEdGDezCbjxs1pUV7Yh1n/GpiaKzfb+Fzi0VLKHF9HJjhArdn2 ZXivX0Kw/1iLXbP4n/xISBnNU6Y9fMS3RbWQOcF2a77tTIK0vZqJb8un19o+NKdX WtoqXhTxJfCvhRHsOM8hM679tDfO2cTI1YoSFAKTkvE+U0pQGo9zUGsI7vcvPE77 DggY9I80pAgykl7wnKzmbq6w/dClGIwnW/Z21RddDVQXTPImZAKtYUQGXlMoDJNo +OcZ1NjYvPz4wZ28LRP70gnGJ4qd8Zzogmx5pswmhSMqsu0p/ZDgg+iQ4DW1AhYX MmYtExLteTMlaGlgf6m/b9Ius5CWe4NoY5zqOnI81TA0/58gKiu8hmKdKxErwlgJ oD+GlEGS398PLeALWEwXfrzHu2pmhOz1ANR15Xlgo9aRKQYkvm2Ngw1OzTGNCVuR /PA2+3Rq1ZP/x7whsJphE0AFaFdCQCizh4LBwp9LsC8Q7IP8z6HSavZoSFZVgB+y otVNBOliyVeXhYLTvwXGiRKy37s6tv1rF8IKv0eP3UI7yYe+XcSV5HBWLuhs0iui owLHgQXUeX3P1VUYa6MEVLRCpp5PA/Y3grwbO7eTGz636W4zZ0CxWh7j3NabOCT+ +cePsb2WhrrhWC63ALXgOWYiicFsGbJYIaMXIM8c00ndZWq6SJg= =q2If -----END PGP SIGNATURE----- --cJg5hbLOUpdhvoB2--