psql and passwd

From: Alex Dovlecel <dovle(at)kbs(dot)twi(dot)tudelft(dot)nl>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: psql and passwd
Date: 2002-11-19 12:34:45
Message-ID: E18E7aY-0003yK-00@ford.kbs.twi.tudelft.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hello all
I create a bash file that
1)drops the database
2)create the database again
3)call the psql on initdb.sql file (wich creates the tables and stuff)
4)call the psql on populatedb.sql file

It works fine... but there is something that I don't like
Step 1) ask me the account passwd
Step 2) ask me the account passwd
Step 3) ask me the account passwd
Step 4) ask me the account passwd

So I have to type the passwd 4 times... for each command!!!

Is there any way around this: to send the password from command line as a
parameter?

I am using bash so there might be someone who can tell me if I can use some
pipe mechanisms to achieve this ?

Tx
dovle

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2002-11-19 12:40:53 Re: psql and passwd
Previous Message Dave Cramer 2002-11-19 12:26:09 Re: default values