D&C Lug - Home Page
Devon & Cornwall Linux Users' Group

[ Date Index ][ Thread Index ]
[ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Importing CSV files into postgresl



On Mon, 12 May 2003, Kai Hendry amazingly fell on a keybaord and wrote:
 
> There is a zillion (best) ways of doing this of course.

and it had to include....

> apt-cache search python postgres

I didn't even see that one coming...no honest. I didn't.

> On Mon, May 12, 2003 at 09:38:41 +0100, Roland Tarver wrote:
> > I've got a small open office calc sheet, that I've saved as a CSV file.
> > I now need to import it into postgres? What's the best way of doing this?

Not a Postgresql user myself, but I know MySQL had some functionality 
available to import CSV data, so I guessed Postgresql does has the same 
thing, and it seems it does.  Look at the COPY command.

http://www.postgresql.com/docs/view.php?version=7.3&idoc=0&file=sql-copy.html

Pete Hatton
---------------------------------
E-mail:  pete@xxxxxxxxxxxxx
Webpage: http://www.monolight.org
---------------------------------
Prediction is very difficult, especially of the future.
- Niels Bohr



--
The Mailing List for the Devon & Cornwall LUG
Mail majordomo@xxxxxxxxxxxx with "unsubscribe list" in the
message body to unsubscribe.


Lynx friendly