Calling psql from a bat file on windows? - Mailing list pgsql-novice

From Oisin Glynn
Subject Calling psql from a bat file on windows?
Date
Msg-id 003101c5096f$7370a870$a974fea9@homisco.local
Whole thread Raw
Responses Re: Calling psql from a bat file on windows?  (John DeSoi <desoi@pgedit.com>)
Re: Calling psql from a bat file on windows?  ("Todd Lewis" <lewis-todd@sbcglobal.net>)
List pgsql-novice

Ok,

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

Oisin Glynn

pgsql-novice by date:

Previous
From: Mitch Pirtle
Date:
Subject: Re: pgsql and adodb's genID() for unique id sequence...
Next
From: Andrew Hammond
Date:
Subject: Re: grant all the database object automatically