<font size="2" color="#0000ff" face="Arial"><span>>I think in old versions of PostGIS, the .so, .dll was
hard-coded. Is that the problem you are running into?</span></font><br>Yes that is the main problem, but there seem to be some other complications. It's not a thing of the past either; this error is from a PostgreSQL 8.3.x dump, PostGIS <a href="http://1.3.3.">1.3.3.</a> Dumped on Ubuntu 8.04 restored on Windows XP:<br>
pg_restore: [archiver (db)] could not execute query: ERROR: could not access file "/usr/lib/postgresql/8.3/lib/liblwgeom": No such file or directory<br><br>The create_undef.pl approach i mentioned before is not working. The postgis objects are all dependent on each other, it's pretty hard to discard some and keep others. (BTW the function doesn't take these dependencies into account, so it's pretty hard to run the SQL without errors. Also it is not distributed with ubuntu 8.04 (nor Debian Etch) AFAIK, so i had to use the one from windows, which worked except for the dependencies when running the SQL ).<br>
<br>My approach is now to split the migration in 2 steps:<br>1. upgrade to the correct version on the native OS (that is, ubuntu will replace Debian because they are much alike postgres wise, and ubuntu has more recent PostgreSQL versions)<br>
2. migrate to the other OS.<br>
<br>The upgrade works with the postgis_restore.pl when the OS is the same. I make sure that the version that i am upgrading to is exactly the same as the version on the other OS that i want to migrate to.<br><br>When migrationg to the other OS, i first create the target database from the postgis_template and restore the custom dump (-Fc) in it, so that errors are ignored (but stored in a log). <br>
All the postgis functions will allready exist, so they will not be attempted to be overwritten.<br>
<br>This results is exactly what i wanted, only there is a small difference in the Windows and Ubuntu versions of postgis <a href="http://1.3.3.">1.3.3.</a> But I will write a different post for that.<br><br>Cheers,<br><br>
WBL<br><br>-- <br>"Patriotism is the conviction that your country is superior to all others because you were born in it." -- George Bernard Shaw<br>