Skip site navigation (1) Skip section navigation (2)

Re: Problem running script

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 (view raw or flat)
Thread:
Lists: pgadmin-supportpgsql-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.


In response to

pgadmin-support by date

Next:From: agnulDate: 2008-07-30 15:59:35
Subject: pgAdminIII / pg_dump version mismatch
Previous:From: Ian LeaDate: 2008-07-30 13:50:00
Subject: Re: Problem running script

pgsql-general by date

Next:From: Francisco ReyesDate: 2008-07-30 14:23:12
Subject: Re: Connecting to an existing transaction state.
Previous:From: Ian LeaDate: 2008-07-30 13:50:00
Subject: Re: Problem running script

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group