Which hook to use when overriding utility commands (COPY ...)

Поиск
Список
Период
Сортировка
От Hannu Krosing
Тема Which hook to use when overriding utility commands (COPY ...)
Дата
Msg-id CAMT0RQRPRu9CwKnXM5dA7F5L-UsGkS_pNyH23hyO1xJZE95OKg@mail.gmail.com
обсуждение исходный текст
Ответы Re: Which hook to use when overriding utility commands (COPY ...)  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
Hi Pgsql-Hackers

Which hook should I use when overriding the COPY command in an extension?

I am working on adding new functionalities to COPY (compression, index management, various other transports in addition to stdin and file, other data formats, etc...) and while the aim is to contribute this to v15 I would also like to have much of it in earlier versions.

As the current policy is to back-port only bugfixes and not "features" , the only way I can see to get it in earlier versions is to provide an extension which intercepts the COPY command and replaces it with my own implementation.

So my question is, which of the hooks would be easiest to use for this ?

At the syntax level it would still look the same COPY ... FROM/TO ... WITH ( options) and the extensibility will be in file names (using a URI scheme mapped to transports) and in options part.
so I hope to fully reuse the parsing part and get in before the existence checks.

Does anyone have experience in this and can [point to samples?

Cheers
Hannu

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: support for MERGE
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Which hook to use when overriding utility commands (COPY ...)