Migrating Access Databases to PostgreSQL
MDB Viewer supports exporting tables to SQL dumps that are compatible with PostgreSQL. To upload the data to a server you must execute the SQL dump with a separate application, for example using pgAdmin. pgAdmin is a free PostgreSQL client application.
For general information about SQL files, see Exporting as SQL.
Migrating Step by Step (using pgAdmin)
In MDB Viewer:
- Click the "Export SQL" toolbar button and select the PostgreSQL format
- Choose whether to export the table structure, data, or both.
- Connect to the PostgresSQL server and select the target database
- Click the "SQL" toolbar button
- Click the "Open File" toolbar button and select the SQL file create with MDB Viewer
- Click the "Execute Query" button
After the query has finished, your tables will show up in the "public" schema.
Access Types vs. PostgreSQL Types
PostgreSQL supports similar column types as MS Access, but they use different names.
|Access Type||PostgreSQL Type|
To prevent compatibility issues, strings are quoted using escape string constants. (see Section 220.127.116.11 of the PostgreSQL documentation)