I'm trying to create a new instance on a different platform of a postgis-enabled database, starting with just the schema definition. What's the right way? This doesn't work below - do I have to partition into separate schemas to have this work perhaps? Thanks, Nick<div>
<br></div><div>[Solaris Postgis 1.3.4] pg_dump -scFc database > schema.sql</div>
<div><br></div><div><div>[Windows Postgis 1.5.1] pgrestore -d database schema.sql</div><div><br></div><div>End result - lots of errors and missing any tables containing postgis objects. Note the hard coded c language function library paths below;</div>
<div><br></div><div>pg_restore: [archiver (db)] Error while PROCESSING TOC:</div><div>pg_restore: [archiver (db)] Error from TOC entry 6; 2615 18201 SCHEMA wastac wastacad</div><div>pg_restore: [archiver (db)] could not execute query: ERROR: schema "wastac" already exists</div>
<div> Command was:</div><div>CREATE SCHEMA wastac;</div><div>pg_restore: [archiver (db)] Error from TOC entry 1223; 2612 17398 PROCEDURAL LANGUAGE plpgsql postgres</div><div>pg_restore: [archiver (db)] could not execute query: ERROR: language "plpgsql"</div>
<div>already exists</div><div> Command was: CREATE PROCEDURAL LANGUAGE plpgsql;</div><div>pg_restore: [archiver (db)] Error from TOC entry 1115; 0 0 SHELL TYPE box2d postgres</div><div>pg_restore: [archiver (db)] could not execute query: ERROR: type "box2d" already exists</div>
<div> Command was: CREATE TYPE box2d;</div><div>pg_restore: [archiver (db)] Error from TOC entry 216; 1255 17477 FUNCTION st_box2d_in(cstring) postgres</div><div>pg_restore: [archiver (db)] could not execute query: ERROR: permission denied for language c</div>
<div> Command was: CREATE FUNCTION st_box2d_in(cstring) RETURNS box2d</div><div> AS '/usr/local/postgis-1.3.4/lib/liblwgeom', 'BOX2DFLOAT4_in'</div><div> LAN...</div><div>pg_restore: [archiver (db)] could not execute query: ERROR: function public.st_box2d_in(cstring) does not exist</div>
<div> Command was: ALTER FUNCTION public.st_box2d_in(cstring) OWNER TO postgres;</div><div>pg_restore: [archiver (db)] Error from TOC entry 218; 1255 17479 FUNCTION st_box2d_out(box2d) postgres</div><div>pg_restore: [archiver (db)] could not execute query: ERROR: permission denied for language c</div>
<div> Command was: CREATE FUNCTION st_box2d_out(box2d) RETURNS cstring</div><div> AS '/usr/local/postgis-1.3.4/lib/liblwgeom', 'BOX2DFLOAT4_out'</div><div> L...</div><div>pg_restore: [archiver (db)] could not execute query: ERROR: function public.st_box2d_out(box2d) does not exist</div>
<div> Command was: ALTER FUNCTION public.st_box2d_out(box2d) OWNER TO postgres;</div><div>pg_restore: [archiver (db)] Error from TOC entry 1114; 1247 17475 TYPE box2d postgres</div><div><br></div><div>...</div><div><br>
</div><div><div>pg_restore: [archiver (db)] could not execute query: ERROR: relation "t_tile_geometry" does not exist</div><div> Command was: GRANT SELECT ON TABLE t_tile_geometry TO wastacportal;</div><div>
pg_restore: [archiver (db)] could not execute query: ERROR: relation "t_tile_geometry" does not exist</div><div> Command was: GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE t_tile_geometry TO wastac;</div><div>
WARNING: errors ignored on restore: 1586</div>
</div></div>