Answer the question
In order to leave comments, you need to log in
How to execute queries against postgresql database in script?
Comrades, tell me, please, how can I write in the script to delete the database, create the database and then cut the rights to a couple of users?
The idea is this: a dump of the N base from another server is uploaded to the server, then you need to drop the N base on the current server, create it, upload the dump there and cut the rights.
That is,
drop database N;
create database N;
Grant all privileges on database N to superpuperadmin;
How to stuff all this into a bash script?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question