Hi,
I'm wondering how I can create a database for a user from within a script.
I have Pg in 'password' mode.
To create this database I'm trying to pass in the password from the script.
For example :
echo myPgPassword | /usr/local/pgslq/bin/createdb yourNewPgDatabase
But it's not working.
I'm still prompted for the password.
My goal is to create the database then change ownership of the database.
The user can then log straight in using phpPgAdmin.
Can you see where I'm going wrong ?
Any suggestions ?
Perhaps I need to use 'Expect' or something ( this is a Debian box )
Thanks
Kind Regards
Rudi.