Postgres in bash-mode - Mailing list pgsql-hackers

From Alexander Pucher
Subject Postgres in bash-mode
Date
Msg-id 3C3D4BD6.3060607@atlas.gis.univie.ac.at
Whole thread Raw
Responses Re: Postgres in bash-mode  (Peter Eisentraut <peter_e@gmx.net>)
Re: Postgres in bash-mode  (David Terrell <dbt@meat.net>)
List pgsql-hackers
Hi,

I hope, that this is not too off topic for this list, but anyway, it 
should be easy for any PG-expert.

I need to run a shell script that logs in to Postgresql, executes a 
query and logs off again.

In MySQL, I did it like this:

'mysql -u user -ppassword < script.sh'

My problem is that I can't find a way to put the password in an 'psql' 
statement at the prompt.

Any suggestions are welcome!

mfg
ALEX

-- 
________________________________________________________

Institut fuer Geographie und Regionalforschung
Universität Wien
Kartografie und Geoinformation

Departement of Geography and Regional Research
University of Vienna
Cartographie and GIS

Universitaetstr. 7, A-1010 Wien, AUSTRIA

Tel: (+43 1) 4277 48644
Fax: (+43 1) 4277 48649
E-mail: pucher@atlas.gis.univie.ac.at

FTP: ftp://ftp.gis.univie.ac.at
WWW: http://www.gis.univie.ac.at/karto
________________________________________________________

"He that will not apply new remedies must expect new evils; for time is the greatest innovator"--Francis Bacon
            




pgsql-hackers by date:

Previous
From: Brent Verner
Date:
Subject: Re: Potential bug in pg_dump ...
Next
From: Daniel Kalchev
Date:
Subject: Re: again on index usage