postgresql

PgDBF

PgDBF is a program for converting XBase databases - particularly FoxPro tables with memo files - into a format that PostgreSQL can directly import. It is the successor to the XBaseToPg project, which works well but is comparatively slow and big and complicated. The smallest changes touched lots of files, and the scope of that project is far larger than I actually needed on a daily basis.

Thus, PgDBF. It's a small C project comprising two files with no dependencies other than standard Unix libraries. While the project is relatively tiny and simple, it's also heavily optimized via profiling. I routinely got benchmark results that were many times faster than with XBaseToPg. In fact, even on slower systems, conversions were typically limited by hard drive speed.

Features

PgDBF was designed with a few core principles:

  • Simplicity. This code should be understandable by anyone who wants to hack it.
  • Robustness. Every syscall is checked for success.
  • Speed. I wanted the fastest conversion available anywhere.
  • Completeness. It has full support for FoxPro memo files.
  • Portable. PgDBF runs on 32- and 64-bit systems, and both little-endian (eg x86) and big-endian (eg PowerPC) architectures.

XBaseToPg

Replacement Notice!

I'm dropping my work on this project in favor of PgDBF, which is functionally identical, faster, and easier to maintain. If this is your first time here, use that project instead. If you're already using XBaseToPg in production, you should probably switch anyway.

Introduction

So, you want to convert some FoxPro tables to PostgreSQL, huh? You're in the right place. Although this project works well for one-time data migrations, it's designed and highly optimized for regularly scheduled jobs.

Installation

  1. Download the "xbase64-3.1.2.tar.gz" archive from the Xbase project at Sourceforge.
  2. Extract it and apply the XbaseToPg patch below.

DBReplicate

Simplify Interbase->PostgreSQL conversions

I wrote a Perl program to help my company migrate from Interbase to PostgreSQL by extracting a database's data and metadata and dumping it as a set of SQL commands (similar to pg_dump or mysqldump).

Powered by Drupal - Modified by Danger4k