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 1uRJbL-009xGp-Iy for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Jun 2025 23:50: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 1uRJbJ-004TUd-LT for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Jun 2025 23:50:54 +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 1uRJbJ-004TU5-Bo for pgsql-hackers@lists.postgresql.org; Mon, 16 Jun 2025 23:50:53 +0000 Received: from mail.clear-code.com ([153.126.203.179]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uRJbF-002Rpv-0U for pgsql-hackers@postgresql.org; Mon, 16 Jun 2025 23:50:52 +0000 Received: from localhost (unknown [IPv6:2404:7a80:9f01:f500:1788:74de:dc85:ea72]) by mail.clear-code.com (Postfix) with ESMTPSA id 57B906C77EB; Tue, 17 Jun 2025 08:50:39 +0900 (JST) DKIM-Filter: OpenDKIM Filter v2.11.0 mail.clear-code.com 57B906C77EB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=clear-code.com; s=default; t=1750117839; bh=/j0GUtTaH+VCks6ycJp/2dxTQDVdthYhWBT0HvxIRkU=; h=Date:To:Cc:Subject:From:In-Reply-To:References:From; b=aQ0rq5Oh2/1o85nyaUh67AYcf7RJuPZyv5TqrYRfDAIeVORWpEhBqHZTMHY5WbXZd BGhqOxXKK1acPaIvHJ4hTjKJ6FAqhx3CbcH9aLZglKlokT1oRI8e7znRVV0eztTNPd NE+R1YuHhNwosmubtKUF2iOkMqhRfXWLP+bYXlYM= Date: Tue, 17 Jun 2025 08:50:37 +0900 (JST) Message-Id: <20250617.085037.540717523379608629.kou@clear-code.com> To: sawada.mshk@gmail.com Cc: michael@paquier.xyz, david.g.johnston@gmail.com, tgl@sss.pgh.pa.us, zhjwpku@gmail.com, pgsql-hackers@postgresql.org Subject: Re: Make COPY format extendable: Extract COPY TO format implementations From: Sutou Kouhei In-Reply-To: References: <20250526.100405.383968457057016818.kou@clear-code.com> X-Mailer: Mew version 6.8 on Emacs 30.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 57B906C77EB X-Rspamd-Server: mail.clear-code.com X-Spamd-Result: default: False [2.90 / 999.00]; SUSPICIOUS_RECIPS(1.50)[]; MID_CONTAINS_FROM(1.00)[]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; TAGGED_RCPT(0.00)[]; ARC_NA(0.00)[]; ASN(0.00)[asn:2518, ipnet:2404:7a80::/29, country:JP]; RCVD_COUNT_ZERO(0.00)[0]; MIME_TRACE(0.00)[0:+]; FREEMAIL_TO(0.00)[gmail.com]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_CC(0.00)[paquier.xyz,gmail.com,sss.pgh.pa.us,postgresql.org]; FROM_EQ_ENVFROM(0.00)[]; TO_DN_NONE(0.00)[]; RCPT_COUNT_FIVE(0.00)[6] X-Rspamd-Action: no action List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, In "Re: Make COPY format extendable: Extract COPY TO format implementations" on Thu, 12 Jun 2025 10:00:12 -0700, Masahiko Sawada wrote: >> So, my opinion is to rely on _PG_init(), with a shared ID if you want >> to expose the method used somewhere for monitoring tools. You could >> as well implement the simpler set of APIs that allocates IDs local to >> each backend, like EXPLAIN, then consider later if shared IDs are >> really needed. The registration APIs don't have to be fixed in time >> across releases, they can be always improved in steps as required. >> What matters is ABI compatibility in the same major version once it is >> released. > > +1 to start with a simpler set of APIs. OK. I'll implement the initial version with this design. (Allocating IDs local not shared.) Thanks, -- kou