Re: importing data automatically

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: importing data automatically
Дата
Msg-id 200310031255.21521.josh@agliodbs.com
обсуждение исходный текст
Ответ на importing data automatically  ("Menke, Kurt" <kmenke@edac.unm.edu>)
Список pgsql-novice
Kurt,

> I am running PostgreSQL 7.3.2 on RedHat 8.  I have many large census tables
> I need to import.  I access the Linux box from my Windows 2000 machine via
> Cygwin and can access PostgreSQL similarly via EMS PostgreSQL Manager.  I
> understand that a table must be created with the correct fields before
> INSERT or COPY can be used, or before the data import wizard in EMS can be
> used.  My problem is that I have some very large tables with hundreds of
> fields to import.  Is there a way to get PostgeSQL to honor the database
> schema from an MS Access database and create the appropriate fields on
> import automagically?

Sure.  Use pgODBC to connect to the PostgreSQL database from MS Access.   Use
that connection to "export" the table design from MS Access to PostgreSQL
(but not the data, just the design!).

Log into PostgreSQL and adjust the data types and of the fields, becuase the
first step will not have worked perfectly.

Create COPY files and use those to load the new tables.

Create your indexes and FKs *after* import.

--
-Josh Berkus
 Aglio Database Solutions
 San Francisco


В списке pgsql-novice по дате отправления:

Предыдущее
От: "Menke, Kurt"
Дата:
Сообщение: importing data automatically
Следующее
От: Nabil Sayegh
Дата:
Сообщение: Re: plperl db crash