How to import/export data from/to an ASCII file?

Raymond Chui <raymond.chui@noaa.gov>

From: Raymond Chui <raymond.chui@noaa.gov>
To: pgsql-hackers@postgresql.org.pgsql-general@postgresql.org
Date: 2000-12-13T21:17:31Z
Lists: pgsql-hackers, pgsql-general

Attachments

For example

create table testTable (
id integer,
name char(20)
);

an ASCII file format with field separator "|" is

1|Hello|
2|Again|
......

There is a way to do this in Oracle, Sybase, Informix and MySQL.
But I want to know how to do this in PostgreSQL.

Please don't tell me use pg_dump, because it is not a correct answer for

my question!

Thank you!