#!/bin/bash
for table in `echo "SELECT schemaname || '.' || relname FROM pg_stat_user_tables;" | psql -A -U postgres -t BASENAME`;
do
echo "GRANT ALL PRIVILEGES ON TABLE $table to \"USERNAME\";"
echo "GRANT ALL PRIVILEGES ON TABLE $table to \"USERNAME";" | psql -A -U postgres -t BASENAME
done
Комментариев нет:
Отправить комментарий