Re: Calling psql from a bat file on windows?

From: John DeSoi <desoi(at)pgedit(dot)com>
To: "Oisin Glynn" <me(at)oisinglynn(dot)com>
Cc: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Calling psql from a bat file on windows?
Date: 2005-02-03 02:01:38
Message-ID: 8A3AA005-7587-11D9-B278-000A95B03262@pgedit.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


On Feb 2, 2005, at 4:37 PM, Oisin Glynn wrote:

>
> I want to call a sql expression( and or file) from a bat file and pipe
> the result to a text file. Sounds super simple.. I am trying to use
> psql but I cannot find a way of passing the password to this. I want
> to schedule the bat file from windows scheduler.
>
> How can I pass the password to psql without human interaction? Or is
> there a smarter way to acheive this?
>
> I did try searching for an answer but if there is a faq I should be
> reading point me there

One option is to setup a .pgpass file. See

http://www.postgresql.org/docs/8.0/interactive/libpq-pgpass.html

John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Rodolfo J. Paiz 2005-02-03 05:27:15 Re: some help
Previous Message Michael Fuhr 2005-02-03 01:12:04 Re: How to "COPY schema1.table TO schema2.table" ?