Re: Automating databse creation
| От | Thomas Pundt |
|---|---|
| Тема | Re: Automating databse creation |
| Дата | |
| Msg-id | 200702091416.33235.mlists@rp-online.de обсуждение исходный текст |
| Ответ на | Automating databse creation ("Ashish Karalkar" <ashish.karalkar@info-spectrum.com>) |
| Список | pgsql-general |
Hi, On Friday 09 February 2007 08:53, Ashish Karalkar wrote: | I want to automate database creation, user creation,table creation via | script. this script will be run by an external programme to postgresql | server. is there any way? | | what i want to do is as follows: | | | #!/bin/sh | | su - postgres [rest of not working script] | is there any way?? | | right now the scripts stop after switching over to postgres user. assuming the script is run as user root, you can invoke it as su - postgres -c /path/to/script Just remove the "su - postgres" from your script. You might want to look at your init scripts (/etc/init.d/postgresql I assume) for how they do it. Ciao, Thomas -- Thomas Pundt <thomas.pundt@rp-online.de> ---- http://rp-online.de/ ----
В списке pgsql-general по дате отправления: