For example, to grant all privileges on all tables of the current database to user username:
|
select 'grant all on '||schemaname||'.'||tablename||' to username;' from pg_tables where schemaname='public'; |
Change username to what you need.
The output of this is a list of commands that that can be copied via clipboard and run all at once.
Например, чтобы дать привилегии ко всем таблицам сразу в текущей базе данных пользователю username:
|
select 'grant all on '||schemaname||'.'||tablename||' to username;' from pg_tables where schemaname='public'; |
Поменяйте username на нужное.
Результатом такого запроса будет список команд, который можно целиком скопировать в командную строку через буфер и выполнить.
Comment it: