Problem running script

Поиск
Список
Период
Сортировка
От Sushma Sagaram
Тема Problem running script
Дата
Msg-id 360848930807251020m598bf531r94b93136aa6314c9@mail.gmail.com
обсуждение исходный текст
Ответы Re: Problem running script  ("Ian Lea" <ian.lea@gmail.com>)
Re: Problem running script  (Ragnar <gnari@hive.is>)
Список 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

В списке pgsql-general по дате отправления:

Предыдущее
От: Ragnar
Дата:
Сообщение: Re: Must be table owner to truncate?
Следующее
От: "Garg, Manjit"
Дата:
Сообщение: Re: Clone a database to other machine