sudo -u postgres createdb ABC
su -c "psql -d ABC"
if [ $3 == 'xxxxx' ]
then
su -c "psql -c \"grant all privileges on database ABC to xxxx\"" postgres
su -c "psql -c \"create schema authorization xxxx\"" postgres
else
su -c "psql -c \"grant all privileges on database ABC to yyyy\"" postgres
su -c "psql -c \"create schema authorization xxxx\"" postgres
fi
Hi Melvin,
I executed the above script but xxxx schema created with in postgres db not with in ABC db. And in terminal didn't show the message connected to ABC database. What is wrong I am doing here?
Regards,
Abhra