Re: How do I pipe output from query to a file in PostgreSQL?

Поиск
Список
Период
Сортировка
От Raymond O'Donnell
Тема Re: How do I pipe output from query to a file in PostgreSQL?
Дата
Msg-id 4AE60F4E.4020402@iol.ie
обсуждение исходный текст
Ответ на How do I pipe output from query to a file in PostgreSQL?  ("Penrod, John" <John.Penrod@STJUDE.ORG>)
Список pgsql-general
On 26/10/2009 18:03, Penrod, John wrote:
> In oracle:
>
> SPOOL filename.txt
> Select * from customer;
> SPOOL OFF
>
> Results are piped to filename.txt
>
>
> How do I do this from the psql command line?

\g <filename> will execute the query and send the result to <filename>.


Ray.


--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie

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

Предыдущее
От: Kevin Kempter
Дата:
Сообщение: Re: How do I pipe output from query to a file in PostgreSQL?
Следующее
От: Thom Brown
Дата:
Сообщение: Re: [ANNOUNCE] [pgeu-general] PGDay.EU 2009 - approaching fast!