Re: Download file from COPY ... TO with pgadmin

Поиск
Список
Период
Сортировка
От Erik Wienhold
Тема Re: Download file from COPY ... TO with pgadmin
Дата
Msg-id 264813354.7537.1675173488843@office.mailbox.org
обсуждение исходный текст
Ответ на Download file from COPY ... TO with pgadmin  (Marco Lechner <mlechner@bfs.de>)
Ответы AW: Download file from COPY ... TO with pgadmin
Список pgsql-general
> On 31/01/2023 14:02 CET Marco Lechner <mlechner@bfs.de> wrote:
>
> Using COPY …TO it is possible to store e.g. the “value” of a bytea cell in a
> directory on the server. E.g. by this:
>
> COPY (SELECT content FROM d_doc WHERE id = 'x123456') TO CONCAT('/tmp/mydoc.pdf’) (FORMAT binary);
>
> As we do not have access to the postgresql fileserver (ssh, …), but can SELECT
> the value of the bytea cell, is It possible to download the bytea directly
> into a file on a client computer when using pgadmin? Is there a solution with
> the COPY … TO command, any pgadmin specific feature or any other simple solution?

Use psql with \copy which targets the client file system.  pgAdmin 5.4+ can also
launch psql.

--
Erik



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

Предыдущее
От: Daulat
Дата:
Сообщение: pgBackrest Error : authentication method 10 not supported
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: pgBackrest Error : authentication method 10 not supported