Re: Postgres in bash-mode

Maarten Boekhold <maarten.boekhold@reuters.com>

From: Maarten.Boekhold@reuters.com
To: Karl DeBisschop <kdebisschop@range.infoplease.com>
Cc: dbt@meat.net, pgsql-hackers@postgresql.org, pucher@atlas.gis.univie.ac.at
Date: 2002-01-13T06:20:53Z
Lists: pgsql-hackers
On 01/12/2002 06:03:44 PM Karl DeBisschop wrote:
> On Sat, 2002-01-12 at 03:32, David Terrell wrote:
> > On Thu, Jan 10, 2002 at 09:07:50AM +0100, Alexander Pucher wrote:
> > > I need to run a shell script that logs in to Postgresql, executes a
> > > query and logs off again.

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

> If you absolutely need to do something like this, look into expect.

Woul be useful if there's an example expect script for this somewhere in 
the distribution or documentation. Lots of people don't know expect, and 
don't want to learn it. They just want to automate database tasks.

Maarten

----

Maarten Boekhold, maarten.boekhold@reuters.com

Reuters Consulting / TIBCO Finance Technology Inc.
Dubai Media City
Building 1, 5th Floor
PO Box 1426
Dubai, United Arab Emirates
tel:+971(0)4 3918300 ext 249
fax:+971(0)4 3918333
mob:+971(0)505526539

------------------------------------------------------------- ---
        Visit our Internet site at http://www.reuters.com

Any views expressed in this message are those of  the  individual
sender,  except  where  the sender specifically states them to be
the views of Reuters Ltd.