Re: Exporting postgres query to CSV

Поиск
Список
Период
Сортировка
От Jim C. Nasby
Тема Re: Exporting postgres query to CSV
Дата
Msg-id 20060515214140.GR26212@pervasive.com
обсуждение исходный текст
Ответ на Re: Exporting postgres query to CSV  (John Purser <jmpurser@gmail.com>)
Список pgsql-general
On Tue, May 09, 2006 at 08:57:57AM -0700, John Purser wrote:
> > I am running postgres 7.4.7 on debian sarge.
> First:
> psql -U <PGSQL USER> -o <OUPUT FILE NAME> --pset format=unaligned
> --pset fieldsep=',' -c '<SQL COMMAND HERE>' -d <DATABASE NAME HERE>
>
> I think that will give you the output you were after assuming you're
> scripting psql and that you replace the values in <> with appropriate
> values. The syntax is slightly different from the psql command line.
>
> Second:
> man psql is your friend.

Third:
7.4.7 is ancient and suffers from a number of data loss bugs. If you
need to stick with 7.4 you should at least be running the most current
version.
--
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461

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

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: Unify distant Postgres databases
Следующее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: Concatenate WAL contents