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

Problem running script

From: "Sushma Sagaram" <sushma(dot)2276(at)gmail(dot)com>
To: pgadmin-support(at)postgresql(dot)org
Subject: Problem running script
Date: 2008-07-23 23:32:19
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgadmin-supportpgsql-general
My requirement is to write a query in a file read the input from that file
run in postgresql and write the output(query results) into a file. I'm not
able to sue combination of \i and \o
Let' say I have file test.sql and in test.sql I write
select * from abc;

Now I need to read the query from the file and write the output to a file. I
=>\i test.sql \o test

but this is not working. can any one tell me how to do this. I also need to
put my file in a place which can run the file at particualr time of the
day(like cron tab). Where do I put my file?



pgadmin-support by date

Next:From: Guillaume LelargeDate: 2008-07-24 07:15:54
Subject: Re: Problem running script
Previous:From: Sufficool, StanleyDate: 2008-07-21 21:19:59
Subject: PGAdmin Filter Screen Unresponsive

pgsql-general by date

Next:From: Garber, MikhailDate: 2008-07-24 01:23:19
Subject: problem installing RPMs on RHEL5
Previous:From: Kevin NeufeldDate: 2008-07-23 22:47:37
Subject: contrib catalogs

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