From: | "Sushma Sagaram" <sushma(dot)2276(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Problem running script |
Date: | 2008-07-25 17:20:01 |
Message-ID: | 360848930807251020m598bf531r94b93136aa6314c9@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-support pgsql-general |
My requirement is
1) 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
use 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 tried
=>\i test.sql \o test
but that is not working. I want to write a script which reads query from
file and write output in a file and I want to do everything in one script
and run it background at a particular time of teh day.
2) How do I run scripts in postgresql? How do I set the shell and execute
the script?
Regards,
Sushma
From | Date | Subject | |
---|---|---|---|
Next Message | Ian Lea | 2008-07-30 13:50:00 | Re: Problem running script |
Previous Message | osalcedo | 2008-07-25 16:53:25 | problemas al crear el servicio |
From | Date | Subject | |
---|---|---|---|
Next Message | Bill Thoen | 2008-07-25 17:36:14 | Problems with pg_dump and -t wildcards |
Previous Message | Joshua D. Drake | 2008-07-25 17:03:12 | Re: php + postgresql |