Re: Export to file

Поиск
Список
Период
Сортировка
От Oliver Elphick
Тема Re: Export to file
Дата
Msg-id 1063187769.21803.110.camel@linda.lfix.co.uk
обсуждение исходный текст
Ответ на Export to file  ("Marvin" <magosoft@gmx.net>)
Список pgsql-admin
On Tue, 2003-09-09 at 17:15, Marvin wrote:
> Hi,
> There is a way to export the result
> of a query into an external DBF or TXT table?
>

You can't write out a DBF file without some other software, but writing
a text file is easy.  In an interactive session of psql, use:

        \o filename

You probably also want:

        \pset format unaligned
        \pset fieldsep ','
        \t

That would produce a text file with comma-separated values and no
headings.

--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight, UK                             http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "Draw near to God and he will draw near to you.
      Cleanse your hands, you sinners; and purify your
      hearts, you double minded."       James 4:8


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

Предыдущее
От: "Alexander V. Ivanko"
Дата:
Сообщение: unsubscribe
Следующее
От: suresh prasanna
Дата:
Сообщение: ...