psql and password

Поиск
Список
Период
Сортировка
От Rudi Starcevic
Тема psql and password
Дата
Msg-id 3CA27648.7060307@oasis.net.au
обсуждение исходный текст
Ответы Re: psql and password  (Oliver Elphick <olly@lfix.co.uk>)
Список pgsql-sql
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.





В списке pgsql-sql по дате отправления:

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: function error
Следующее
От: Rudi Starcevic
Дата:
Сообщение: Re: psql and password