I want to import 'prod.sql' file to database 'd_p_d' for 'postgres' user
postgres=# \l
d_p_d | postgres | UTF8 | en_IN | en_IN |
postgres | postgres | UTF8 | en_IN | en_IN |
template0 | postgres | UTF8 | en_IN | en_IN | =c/postgres +
| | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | en_IN | en_IN | =c/postgres +
| | | | | postgres=CTc/postgres
postgres=# \du
postgres | Superuser, Create role, Create DB, Replication | {}
The error:
postgres=# \i /home/pallavsharma/prod.sql
/home/pallavsharma/prod.sql: Permission denied
also
postgres=# \i /var/dump/prod.sql
/var/dump/prod.sql: Permission denied