Re: Redirecting query's output to a textfile?

Поиск
Список
Период
Сортировка
От Herb Blacker
Тема Re: Redirecting query's output to a textfile?
Дата
Msg-id 3C6D5F1B.4000702@isgenesis.com
обсуждение исходный текст
Ответ на Redirecting query's output to a textfile?  (Peter Peltonen <peter.peltonen@fivetec.com>)
Список pgsql-general
If you use psql and your query is in a file, try this:

$psql <dbname>

<dbname># \o <filename> (puts the output of the next query in a file)

<dbname># \i <queryfile> (reads and executes the query from the file)


<dbname> \q (quit psql)


Peter Peltonen wrote:

> A basic question:
>
> How in PostgreSQL do I redirect the output of an SQL query to a textfile?
>
>

Hope this helps...
_________________________
Herb Blacker
Database Administrator
ReCare, Inc.
(512) 791-4340
herbblacker@isgenesis.com


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

Предыдущее
От: Holger Marzen
Дата:
Сообщение: Re: Question: Who's Using Postgres
Следующее
От: Brian Hirt
Дата:
Сообщение: Re: Question: Who's Using Postgres