From: | "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com> |
---|---|
To: | "Pingale(dot)amol(at)gmail(dot)com" <Pingale(dot)amol(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: postgres bash prompt error while user creation |
Date: | 2007-10-30 07:38:44 |
Message-ID: | dcc563d10710300038v3194c111h2592f75dffd988e5@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 10/25/07, Pingale(dot)amol(at)gmail(dot)com <Pingale(dot)amol(at)gmail(dot)com> wrote:
> hello group
> i want to create a shell script in that i want to create postgresql
> user and database.both this task are created properly and executed
> properly but after user and DB creation i am there on ( -bash-3.00$ )
> and i wanna come back to [root(at)localhost:localdomain ~]# and my
> script is
> #!/bin/bash
> su -l postgres;
> psql -U postgres -c "CREATE USER admin27 WITH PASSWORD 'admin27'
> CREATEDB;" template1
> psql -U admin27 -c "CREATE DATABASE emcc27;" template1 \q exit;
> plzz help me to back to root from postgres bash prompt
first off, stop doing things as root that you don't need to be root to
do. It's dangerous and a bad habit to get into.
Next, how are you calling your bash script? Normally if it's set to
executable and you just call it by name i.e. ./myscript it should exit
the bash terminal when done.
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Huxton | 2007-10-30 07:41:09 | Re: Which index can i use ? |
Previous Message | Albe Laurenz | 2007-10-30 07:18:08 | Re: sql |