I had a go at this earlier with reasonable success. You have to make an uncompressed pg dump with insert statements (these are both optional parametrs to pg_dump). Some very slight adjustment to the structural metadata - I'll document later if people are interested - and then tried to import data.
Only one snag - pg has its own peculiar way of handling binary strings (bytea fields) which h2 doesn't emulate. Can't blame h2 too much - what pg does is a bid weird. This affects systemsettings, usersettings and reportsettings. Other than that I imported 1.5 million datavalues and associated dataelements, orgunits etc. The h2 guys are aware of the bytea compatibility problem and have the issue roadmapped - apparently they will bump it if it something people request. I guess I should request. If I was really pushed I could write a script to find all the binary strings in the pg dump and try to convert them to something h2 is happy with. Having said that, I think all the places where we currently use binary strings are really unnecessary (storing evil java serialized objects) which I think have a historical rationale. It should be relatively easy and desirable to change these - particularly as we also want to represent these things in xml - but we'd have to consider the effect on compatibility with legacy dhis databases which have the blobs. I guess we'd need an upgrade script of some sort. So the prognosis is good but not quite seamless yet. Cheers Bob BTW how did you make the demo db? 2010/4/12 Lars Helge Øverland <larshe...@gmail.com>: > > > I see H2 can be run in "PostgreSQL mode" by appending ;MODE=PostgreSQL to > the connection URL: > http://www.h2database.com/html/features.html#compatibility > > Could be interesting to try to import the pgdump using this.. > Lars > _______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp