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 1rBHOq-00ADIn-PN for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Dec 2023 16:38:56 +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 1rBHOo-001Et9-DD for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Dec 2023 16:38:54 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rBHOn-001Et1-VF for pgsql-hackers@lists.postgresql.org; Thu, 07 Dec 2023 16:38:54 +0000 Received: from mail-qk1-x736.google.com ([2607:f8b0:4864:20::736]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rBHOk-009H5L-J3 for pgsql-hackers@postgresql.org; Thu, 07 Dec 2023 16:38:52 +0000 Received: by mail-qk1-x736.google.com with SMTP id af79cd13be357-77f2dc3a9bcso45010285a.3 for ; Thu, 07 Dec 2023 08:38:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dunslane-net.20230601.gappssmtp.com; s=20230601; t=1701967129; x=1702571929; darn=postgresql.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=MQ6jdRnJ36Vy3wJ+v2S/Cw0GCtSzSVQ1WXuGgAMEbII=; b=I+VKxoOPohpAtELKnzHLx5m9eVdcL3nTSz52e3CYakD9q6jJV0eaWmoPhXcbnoCrvU U58j+a9CdoYBFt6oEankqCBYEK2Tv+qlISTCiR3XXAy/Rdh/cpG1qUnVUtPKQwOWdPKZ NhvZH83kEaqysv1J5/p/EKD46oBpOg5gFIo4bTjCrGfwTW1lg9DDG6gDEMCwRe6qpP38 s8fGXDCVekAi7PbMwLuG9bcsANCIxma1+wAd+ee0lAtw66wD3RE/YEa2G/Vp4zagnmzi MjC5HnhoXpU5gwgKoLP6TIzyMiomQU7GoLHV4pfGW10MGWfnZjwieWdvEaodY5zwVQ1W Fj6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701967129; x=1702571929; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=MQ6jdRnJ36Vy3wJ+v2S/Cw0GCtSzSVQ1WXuGgAMEbII=; b=MaDfhD4Qaa9y75hA3xf9SdIV1UaLbfpq8n5ll/qD1z9pzMilULvQegPZQUxKQpAqgE qU9kWLdRTfrMHlmt0umWbpoH2s8NMrDi/jfcXPp+yBmk5B7xK+GG8GLNQcoxJ4ZOXeIW xc3ib69HDNc68Nq2NiXpzW6OttyJjHcAwUkxbskaWoReMdWRSJp86vmPNwjxLN6MINFn Hi66qfLF/Plm9LV7/RdBUKGD4DnrzIsZD9BiNz1nlNTWJl+vb08t3/NmsZJkLHYIKfdN /8JJmn7ohwwX/EMz7huBxVc7+O+XgyaFMcMDpbsrKflDjCQ+Lm3CFGNMS69BLwt7VARS lIKA== X-Gm-Message-State: AOJu0YzXBKxE/TMNkUC9ooTa151yuyGV//pAKUk1AZIyMxdGvpAou0yQ G1FAOQqiKAJ/OdVgUaMAgn9MZA== X-Google-Smtp-Source: AGHT+IGCWcFldwrCAGUT0fBrW8eivDFHnwuUITnEkpB7IgJku6OXgCx0QShdDl/OpsCjK3aUWczIMw== X-Received: by 2002:a05:620a:8d6:b0:77f:3bbc:c768 with SMTP id z22-20020a05620a08d600b0077f3bbcc768mr1481678qkz.45.1701967129086; Thu, 07 Dec 2023 08:38:49 -0800 (PST) Received: from ?IPV6:2605:a601:91bc:f600::2bb? ([2605:a601:91bc:f600::2bb]) by smtp.googlemail.com with ESMTPSA id bk7-20020a05620a1a0700b0077d749de2a3sm21087qkb.67.2023.12.07.08.38.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 07 Dec 2023 08:38:48 -0800 (PST) Message-ID: <80949637-4e74-6c84-dc4d-908563dade29@dunslane.net> Date: Thu, 7 Dec 2023 11:38:47 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: Make COPY format extendable: Extract COPY TO format implementations Content-Language: en-US To: Junwang Zhao , Michael Paquier Cc: Sutou Kouhei , nathandbossart@gmail.com, pgsql-hackers@postgresql.org References: <20231206.151908.897707799247386849.kou@clear-code.com> <20231206.162834.1390394858102165899.kou@clear-code.com> From: Andrew Dunstan In-Reply-To: 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 2023-12-07 Th 03:37, Junwang Zhao wrote: > > The point of this refactor (from my view) is to make it possible to add new > copy handlers in extensions, just like access method. As Andres suggested, > a system catalog like *pg_copy_handler*, if we split TO and FROM into two > sets of routines, does that mean we have to create two catalog( > pg_copy_from_handler and pg_copy_to_handler)? Surely not. Either have two fields, one for the TO handler and one for the FROM handler, or a flag on each row indicating if it's a FROM or TO handler. cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com