Обсуждение: Re: [GENERAL] How to import data from MDB or pipe delimited file into PostgreSQL
Re: [GENERAL] How to import data from MDB or pipe delimited file into PostgreSQL
От
Mike Mascari
Дата:
--- "Doran L. Barton" <fozz@iodynamics.com> wrote: > Not long ago, PostgreSQL proclaimed... > > What is the best way to import into a PostgreSQL > database data from a > > Microsoft Access database? > > > > Should I export the data to a pipe or comma > delimited file and then import? > > *But how can I do that* ? > > Once you have an Access table exported using some > kind of delimiter, use > the COPY command to import it into a table in > PostgreSQL. > > psql> COPY INTO TABLE1 FROM > '/home/joe/access_export.csv' USING > USING DELIMITER ','; > > I'm not aware of any way to import table schemas > from Access- you'll > probably still have to do that by hand. > > -=Fozz One way is to (a) install and configure the PostgreSQL ODBC driver, and (b) export the selected tables to PostgreSQL via ODBC using the File->Save As/Export... command. The ODBC driver will automatically issue the appropriate CREATE TABLE statement and insert the data from the existing Access database. However, you may not be satisfied with the data-type mapping the ODBC driver chooses to generate for your existing tables. Another way is to use a PostgreSQL upsizing tool. I have seen a post on this list several months ago regarding this tool, which looks promising. The search engine for the mailing list archives at www.postgresql.org appeared broken as of a couple of days ago and I don't have the URL to the page, but an upsizing tool does, indeed, exist. Good luck, Mike Mascari (mascarim@yahoo.com) ===== __________________________________________________ Do You Yahoo!? Bid and sell for free at http://auctions.yahoo.com
Re: [GENERAL] How to import data from MDB or pipe delimited file into PostgreSQL
От
"Ross J. Reedstrom"
Дата:
Mike (and Doran) - Ah, that's the keyword I needed: grepping for 'upsiz' in my personal postgresql archives finds s tool called 'pgupt' at: http://dspace.dial.pipex.com/boylesa/pgupt/pgupt.shtml I haven't used it, but it seems to be targeted at exactly this task. Ross On Fri, Oct 01, 1999 at 10:15:23PM -0700, Mike Mascari wrote: > --- "Doran L. Barton" <fozz@iodynamics.com> wrote: <looking for help with MS-access -> PostgreSQL migration> > > Another way is to use a PostgreSQL upsizing tool. > I have seen a post on this list several months ago > regarding this tool, which looks promising. The > search engine for the mailing list archives at > www.postgresql.org appeared broken as of a couple of > days ago and I don't have the URL to the page, but an > upsizing tool does, indeed, exist. > -- Ross J. Reedstrom, Ph.D., <reedstrm@rice.edu> NSBRI Research Scientist/Programmer Computer and Information Technology Institute Rice University, 6100 S. Main St., Houston, TX 77005