Re: Connect to a database in a .sql file - Mailing list pgsql-general

From Richard Huxton
Subject Re: Connect to a database in a .sql file
Date
Msg-id 4371A310.6010002@archonet.com
Whole thread Raw
In response to Re: Connect to a database in a .sql file  (Assad Jarrahian <jarraa@gmail.com>)
List pgsql-general
Assad Jarrahian wrote:
> Got it. I will be more careful with words.
>
> Thanks tom for getting 8.1!
> one more question.
> Where does the directory lie for psql (so I can put a .sql file in there and
> run it) for windows?

I'm not familiar with the Windows version, but the psql.exe file should
be with all the other executables. You can use the -f flag to supply a
file to process:
   psql -f <path-to-sql-file>

Also, if you start psql from a command-prompt you can process a file
from within psql using:
   \i <path-to-sql-file>

See the documentation for full details.

--
   Richard Huxton
   Archonet Ltd

pgsql-general by date:

Previous
From: Devrim GUNDUZ
Date:
Subject: PostgreSQL 8.1.0 RPMs are available for download
Next
From: Richard Huxton
Date:
Subject: Re: Transactions, Triggers and Error Messages