From: | "Rod Taylor" <rbt(at)barchord(dot)com> |
---|---|
To: | "Alexander Pucher" <pucher(at)atlas(dot)gis(dot)univie(dot)ac(dot)at>, "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Postgres in bash-mode |
Date: | 2002-01-11 04:31:23 |
Message-ID: | 001301c19a58$d3a65f20$8001a8c0@jester |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I used to be able to do:
(echo "login\npassword\n"; bench.sh) | psql -h system database
Don't really know if it works anymore though. Started using SSL
related tools.
--
Rod Taylor
This message represents the official view of the voices in my head
----- Original Message -----
From: "Alexander Pucher" <pucher(at)atlas(dot)gis(dot)univie(dot)ac(dot)at>
To: "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org>
Sent: Thursday, January 10, 2002 3:07 AM
Subject: [HACKERS] Postgres in bash-mode
> 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(at)atlas(dot)gis(dot)univie(dot)ac(dot)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
>
>
>
>
>
> ---------------------------(end of
broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2002-01-11 04:43:41 | Re: Postgres in bash-mode |
Previous Message | Daniel Kalchev | 2002-01-11 04:08:48 | Re: again on index usage |