Reading from a text file into PostgreSQL

Started by Eyinagho Newtonover 21 years ago3 messages
#1Eyinagho Newton
neyinagho@yahoo.com

Hiya Everyone,

Can anyone explain how postgreSQL reads from a text
file into tables already created in PostgreSQL?

I am also checking the thread in the Forum just to see
if someone has written about it in the past.

Thanks.

Newton

_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com

#2Peter Eisentraut
peter_e@gmx.net
In reply to: Eyinagho Newton (#1)
Re: Reading from a text file into PostgreSQL

Eyinagho Newton wrote:

Can anyone explain how postgreSQL reads from a text
file into tables already created in PostgreSQL?

Please direct general usage questions to <pgsql-general@postgresql.org>.

I am also checking the thread in the Forum just to see
if someone has written about it in the past.

Please do that before posting.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

#3Chester Kustarz
chester@arbor.net
In reply to: Eyinagho Newton (#1)
Re: Reading from a text file into PostgreSQL

On Thu, 7 Oct 2004, Eyinagho Newton wrote:

Can anyone explain how postgreSQL reads from a text
file into tables already created in PostgreSQL?

Check out COPY command.

http://www.postgresql.org/docs/7.4/interactive/sql-copy.html

The file has to be in a certain format as explained in the
documentaion. It is fast and simple.