Re: Make COPY format extendable: Extract COPY TO format implementations

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Junwang Zhao <zhjwpku(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Sutou Kouhei <kou(at)clear-code(dot)com>, nathandbossart(at)gmail(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Make COPY format extendable: Extract COPY TO format implementations
Date: 2023-12-07 16:38:47
Message-ID: 80949637-4e74-6c84-dc4d-908563dade29@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2023-12-07 16:50:26 Re: Building PosgresSQL with LLVM fails on Solaris 11.4
Previous Message Noah Misch 2023-12-07 16:35:13 Re: Is WAL_DEBUG related code still relevant today?