Re: flat file database to postgres - Mailing list pgsql-sql

From Frank Finner
Subject Re: flat file database to postgres
Date
Msg-id 20040316143023.29ad9dbd.postgresql@finner.de
Whole thread Raw
In response to flat file database to postgres  (noor@cs.man.ac.uk)
Responses Re: flat file database to postgres  (Tatsuo Ishii <t-ishii@sra.co.jp>)
List pgsql-sql
On Tue, 16 Mar 2004 12:33:57 -0000 (GMT) noor@cs.man.ac.uk sat down, thought long and then wrote:

> 
> Hi
> 
> Does anybody know how to export data from a flatfile (using perl) database
> to postgres?
> 
> Thanks

If it is some kind of CSV (text with separators) you could use DBD::CSV for reading and DBD::Pg for
writing. Or you read the file with Perl´s standard functions, treat the data to be
PostgreSQL-insert-query-compatible (regarding apostrophes for example) and then use DBD::Pg (that´s
what I usually do). If you have some kind of DBase files, you can use DBD::XBase.

Regards, Frank.

pgsql-sql by date:

Previous
From: Dana Hudes
Date:
Subject: Re: could not create shared memory segment: Invalid argument
Next
From: Andrew Sullivan
Date:
Subject: Re: conversion of postgres database to oracle