Re: flat file database to postgres

From: Frank Finner <postgresql(at)finner(dot)de>
To: noor(at)cs(dot)man(dot)ac(dot)uk
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: flat file database to postgres
Date: 2004-03-16 13:30:23
Message-ID: 20040316143023.29ad9dbd.postgresql@finner.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Tue, 16 Mar 2004 12:33:57 -0000 (GMT) noor(at)cs(dot)man(dot)ac(dot)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.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Andrew Sullivan 2004-03-16 13:56:24 Re: conversion of postgres database to oracle
Previous Message Dana Hudes 2004-03-16 13:02:19 Re: could not create shared memory segment: Invalid argument