From: | Simon Drabble <simon(at)eskimo(dot)com> |
---|---|
To: | Bruce Tong <zztong(at)laxmi(dot)ev(dot)net> |
Cc: | PostgreSQL General <pgsql-general(at)postgreSQL(dot)org> |
Subject: | Re: [GENERAL] CVS Import/Export |
Date: | 1999-08-18 14:52:39 |
Message-ID: | Pine.LNX.3.96.990818104508.2005A-100000@dragon |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
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(at)eskimo(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Herouth Maoz | 1999-08-18 14:56:44 | Re: [GENERAL] CVS Import/Export |
Previous Message | The Hermit Hacker | 1999-08-18 14:42:58 | Re: [GENERAL] CVS Import/Export |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 1999-08-18 14:56:17 | Re: [HACKERS] Architecture |
Previous Message | The Hermit Hacker | 1999-08-18 14:42:58 | Re: [GENERAL] CVS Import/Export |