Re: "permission denied to COPY to or from an external program" even with GRANT pg_execute_server_program

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: "permission denied to COPY to or from an external program" even with GRANT pg_execute_server_program
Дата
Msg-id 1709907.1718243286@sss.pgh.pa.us
обсуждение исходный текст
Ответ на "permission denied to COPY to or from an external program" even with GRANT pg_execute_server_program  (Chema <chema@interneta.org>)
Список pgsql-general
Chema <chema@interneta.org> writes:
> been banging my head against this one for a couple days.  Googling and
> StackExchange were just as useful, so you're my last hope.  I've been
> unable to get a non-admin user to run Copy From Program even after granting
> pg_execute_server_program, and everything else I could think of.  It always
> fails with ERROR: permission denied to COPY to or from an external program.

Works for me:

regression=# create user joe;
CREATE ROLE
regression=# \c - joe
You are now connected to database "regression" as user "joe".
regression=> create table jt (t1 text);
CREATE TABLE
regression=> copy jt From Program 'echo "Buffa Testata"' CSV;
ERROR:  permission denied to COPY to or from an external program
DETAIL:  Only roles with privileges of the "pg_execute_server_program" role may COPY to or from an external program.
HINT:  Anyone can COPY to stdout or from stdin. psql's \copy command also works for anyone.
regression=> \c - postgres
You are now connected to database "regression" as user "postgres".
regression=# GRANT pg_execute_server_program TO joe;
GRANT ROLE
regression=# \c - joe
You are now connected to database "regression" as user "joe".
regression=> copy jt From Program 'echo "Buffa Testata"' CSV;
COPY 1

What PG version are you working with?

            regards, tom lane



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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: "permission denied to COPY to or from an external program" even with GRANT pg_execute_server_program
Следующее
От: Chema
Дата:
Сообщение: Re: "permission denied to COPY to or from an external program" even with GRANT pg_execute_server_program