Re: Copy Documentation

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Copy Documentation
Дата
Msg-id CAKFQuwbHbRMzkzCjioV-8LvtNCJnJ4H81xH4PUg7+iy_3OLhJA@mail.gmail.com
обсуждение исходный текст
Ответ на Copy Documentation  (PG Doc comments form <noreply@postgresql.org>)
Список pgsql-docs


On Thursday, February 17, 2022, PG Doc comments form <noreply@postgresql.org> wrote:
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/14/sql-copy.html
Description:

The documentation states that headers are only used for CSV files, but there
is a header "PGCOPY" when using a BINARY export. e.g.
COPY (SELECT zipfile FROM file_upload) TO PROGRAM 'cat > /tmp/dunc ' (FORMAT
binary);
Please can we have an example of using COPY (server/plpgsql) to copy a bytea
(eg image) column to an image file, unchanged - i.e. no headers.

To my knowledge there is no such example possible.  If you want to export the contents of a bytea to a file you need to do so using client-side code, pulling the data from a normal resultset.  This includes using an untrusted language function.

David J.

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: maximum number of backtrace frames logged by backtrace_functions
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: maximum number of backtrace frames logged by backtrace_functions