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 1o0ebh-0007XD-7n for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Jun 2022 07:35:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1o0ebg-0001Ls-26 for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Jun 2022 07:35:28 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o0ebf-0001Li-Ou for pgsql-hackers@lists.postgresql.org; Mon, 13 Jun 2022 07:35:27 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o0ebb-0005HP-UN for pgsql-hackers@postgresql.org; Mon, 13 Jun 2022 07:35:27 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id C162D320097D; Mon, 13 Jun 2022 03:35:19 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Mon, 13 Jun 2022 03:35:20 -0400 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=fm2; t=1655105719; x= 1655192119; bh=iCNHnIf8bSqcgSM9sJEG62/XccddIknRKWGdaYk+tVg=; b=q GYVm/MoT22I8ktU5NYcokUMq/saEJ+khjlzEoLJjYJi1FAoDzqffdnF6kWdXd0FJ iDnOInpeCerV2p0fFgm7KX7rx8CxbA9RPUQOTdRrhUyQaxfHDsuOshVpmgyKJx0r Jrj3eoL2JFLXdBsS+7OOw2uivB16aRblBBizwO85Eu3YfnmGwOJO2rECL6DdW2XI 8vTprzB6muzrv9zu+fPvrFAYfQtrARnEiv8gZQ/pzoq/LUgwSn8S+8sN234987+R HCi0tNKm9fkfkAaYXOW0GS7JGMIVpdlNI6mjbEv3xKbiWWYWflVc4QCtae/f9bOn +zYezA2yrHnFt7Bp8Q+Mw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudduiedgudduiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomheprfgv thgvrhcugfhishgvnhhtrhgruhhtuceophgvthgvrhdrvghishgvnhhtrhgruhhtsegvnh htvghrphhrihhsvggusgdrtghomheqnecuggftrfgrthhtvghrnhepheelffeggedujeet iefhleetuddvieffhfffvdejvdffgeejkeduleduheduieefnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhdrvghishgvnhhtrhgr uhhtsegvnhhtvghrphhrihhsvggusgdrtghomh X-ME-Proxy: Feedback-ID: i131946ab:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 13 Jun 2022 03:35:17 -0400 (EDT) Message-ID: <2fa8b595-62e6-49db-02aa-a01e2455ba79@enterprisedb.com> Date: Mon, 13 Jun 2022 09:35:16 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: Add header support to text format and matching feature Content-Language: en-US To: Julien Rouhaud , Andrew Dunstan Cc: Greg Stark , =?UTF-8?Q?R=c3=a9mi_Lapeyre?= , Zhihong Yu , David Steele , Michael Paquier , vignesh C , PostgreSQL-development , Daniel Verite References: <94FDDB44-A608-4C75-A733-9F8FC5180D6B@lenstra.fr> <4816b2df-646f-dc19-e5cc-4bfbd04c0e43@enterprisedb.com> <07891B9D-2140-4C06-AF96-C14F1E1B0E8E@lenstra.fr> <8eba1968-9503-5be7-b473-37383f17bb72@enterprisedb.com> <206ac69a-4e47-c49a-66ae-e748c339ba35@enterprisedb.com> <20220607154744.vvmitnqhyxrne5ms@jrouhaud> <20220613023213.bj7qjnplvgfmx522@jrouhaud> From: Peter Eisentraut In-Reply-To: <20220613023213.bj7qjnplvgfmx522@jrouhaud> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 13.06.22 04:32, Julien Rouhaud wrote: >> I think it makes more sense to have a sanity check to prevent HEADER >> MATCH with COPY TO. > > I'm fine with it. I added such a check and mentioned it in the documentation. > I think it would still be problematic if the target table has dropped columns. > Fortunately, as I initially thought the problem is only due to a thinko in the > original commit which used a wrong variable for the raw_fields offset. Once > fixed (attached v1) I didn't see any other problem in the rest of the logic and > all the added regression tests work as expected. Thanks for this patch. I'll check it in detail in a bit. It looks good to me at first glance.