Re: Problem running script - Mailing list pgsql-general

From Francisco Reyes
Subject Re: Problem running script
Date
Msg-id bfde446b7ec10d79d356695c55e5770d@stringsutils.com
Whole thread Raw
In response to Re: Problem running script  ("Ian Lea" <ian.lea@gmail.com>)
List pgsql-general
On 9:50 am 07/30/08 "Ian Lea" <ian.lea@gmail.com> wrote:
> $ psql -whatever < test.sql > test.log

Also
psql -f <filename> > test.log
Almost the same as above..


> >  =>\i test.sql \o test

That would be wrong.
Say you had test.sql
select * from mytable;

You can change test.sql to:
\o test.log
select * from mytable;

Then you could do \i test.sql and accomplish what you are trying to do.

If your DB has passwords enable you may need to put the user/password combo
in .pgpass.


pgsql-general by date:

Previous
From: "Ian Lea"
Date:
Subject: Re: Problem running script
Next
From: "Francisco Reyes"
Date:
Subject: Re: Connecting to an existing transaction state.