Re: Postgres in bash-mode

From: Maarten(dot)Boekhold(at)reuters(dot)com
To: Karl DeBisschop <kdebisschop(at)range(dot)infoplease(dot)com>
Cc: dbt(at)meat(dot)net, pgsql-hackers(at)postgresql(dot)org, pucher(at)atlas(dot)gis(dot)univie(dot)ac(dot)at
Subject: Re: Postgres in bash-mode
Date: 2002-01-13 06:20:53
Message-ID: T586aea2109c407b7078dc@reuters.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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(dot)boekhold(at)reuters(dot)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.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2002-01-13 06:23:10 Re: pg_upgrade
Previous Message Peter Eisentraut 2002-01-13 06:16:19 About pg_upgrade