Re: pg_dump bug fixing - Mailing list pgsql-hackers

From Josh Berkus
Subject Re: pg_dump bug fixing
Date
Msg-id 200408030829.39613.josh@agliodbs.com
Whole thread Raw
In response to Re: pg_dump bug fixing  ("Joshua D. Drake" <jd@commandprompt.com>)
Responses Re: pg_dump bug fixing  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
List pgsql-hackers
Chris,

> I was thinking a pg_export utility that can output to a range of other
> databases SQL formats would also be a good idea.  It would share about
> 90% of the pg_dump code, but I'm trying to think of how to avoid
> duplicating the code.

I'm not really keen on this idea unless you're eager to make a 5-year 
commitment to maintain the code.   The load formats of other RDBMSes change 
all the time -- MySQL is a particularly egregious example, with 2 
incompatible changes in the last year -- and it would become a pain to keep 
track.   

More to the point, there are a number of 3rd-party OSS and proprietary 
utilities which can do this kind of format conversion.   For example, Perl 
DB::Interpolator will cover PG, MySQL, Oracle and MSSQL once that 
functionality is out of beta.

I can see, though, having a --strict-sql switch for pg_dump which would dump 
all database objects in strict SQL92, which should be pretty compatible with 
other systems.   This should also be easier to implement and trivial to 
maintain.  Though it would mean not dumping functions and doing a few data 
type conversions.

-- 
Josh Berkus
Aglio Database Solutions
San Francisco


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Two questions about savepoints: Bug or feature?
Next
From: Tom Lane
Date:
Subject: Re: How to crash postgres using savepoints