| From: | "Francisco Reyes" <lists(at)stringsutils(dot)com> |
|---|---|
| To: | " Ian Lea " <ian(dot)lea(at)gmail(dot)com> |
| Cc: | <pgsql-general(at)postgresql(dot)org>, <sushma(dot)2276(at)gmail(dot)com> |
| Subject: | Re: Problem running script |
| Date: | 2008-07-30 14:18:36 |
| Message-ID: | bfde446b7ec10d79d356695c55e5770d@stringsutils.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgadmin-support pgsql-general |
On 9:50 am 07/30/08 "Ian Lea" <ian(dot)lea(at)gmail(dot)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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | agnul | 2008-07-30 15:59:35 | pgAdminIII / pg_dump version mismatch |
| Previous Message | Ian Lea | 2008-07-30 13:50:00 | Re: Problem running script |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Francisco Reyes | 2008-07-30 14:23:12 | Re: Connecting to an existing transaction state. |
| Previous Message | Ian Lea | 2008-07-30 13:50:00 | Re: Problem running script |