Re: [GENERAL] CVS Import/Export

Поиск
Список
Период
Сортировка
От Simon Drabble
Тема Re: [GENERAL] CVS Import/Export
Дата
Msg-id Pine.LNX.3.96.990818104508.2005A-100000@dragon
обсуждение исходный текст
Ответ на CVS Import/Export  (Bruce Tong <zztong@laxmi.ev.net>)
Список pgsql-general
On Wed, 18 Aug 1999, Bruce Tong wrote:

> I feel like such a bone-head asking this question, but I didn't find the
> answer in the FAQ or the documentation, other than pgaccess is supposed to
> have some of this functionality...
>
> How do I import/export comma delimited tables?
>
> I thought a combination of pg_dump and psql might do it, but if so I must
> have missed it. I saw a mention of it for pgaccess, but I'm looking for
> something I can put in a shell script.
>
> --
>
> Bruce Tong                 |  Got me an office; I'm there late at night.

If you're after changing the field separator, psql has a \f command.

You could do something like:

$ psql -e <dbname> < out.sql > dump

where out.sql looks like:

\f ,
\o
-- some select statements go here
SELECT foo FROM bar;

-- EOF


A method for importing would be similar.



Simon.
--
 "Don't anthropomorphise computers - they don't like it."

   Simon Drabble                      It's like karma for your brain.
   simon@eskimo.com


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

Предыдущее
От: The Hermit Hacker
Дата:
Сообщение: Re: [GENERAL] CVS Import/Export
Следующее
От: Herouth Maoz
Дата:
Сообщение: Re: [GENERAL] CVS Import/Export