[postgis-users] postgresql8.0 and postgis1.0.0

strk at refractions.net strk at refractions.net
Thu Feb 17 00:26:40 PST 2005


On Wed, Feb 16, 2005 at 06:16:36PM -0700, Pritesh Shah wrote:
> hi,
> 
> I would like to thank everybody for their responses to my question. I
> tried a couple of things and the best thing for me was to use
> utils/postgis_restore.pl script.
> 
> I ran this script on some sample databases and they all seemed to
> work, but partially, as there are still some errors.
> 
> These errors are because some postgis content is not being stripped
> out while writing into the $dump.list file. A sample of where it fails
> is:
> 
> ....
> ....
> ....
> CREATE FUNCTION wkb_recv(internal) RETURNS wkb
>    AS '$libdir/libpostgis.so.0.8', 'WKB_recv'
>    LANGUAGE c STRICT;
> ERROR:  could not access file "$libdir/libpostgis.so.0.8": No such file or direc
> tory
> ALTER FUNCTION public.wkb_recv(internal) OWNER TO brook;
> ERROR:  function public.wkb_recv(internal) does not exist
> ...
> ...
> ...
> 
> This line should be stripped out as in the new postgis (1.0.0) there
> is nothing called "WKB_recv" which existed in the older version
> (0.8.2)
> 
> There are many such cases where the postgis_restore.pl script fails in
> removing the postgis stuff. I'm currently working on getting this
> fixed.

I've added wkb_recv and wkb_send in the list of obsoleted functions
handled by postgis_restore.pl. Could you try current (CVS) version ?
Would you send a list of other uncought obsoleted functions ?

Be aware (if you're going to patch postgis_restore.pl yourself) that
some failures are due to different output from different versions
of pg_restore.

Note finally that the errors you're getting won't hurt unless the
restore call is interrupted by the error (ie. transactional).

--strk;

> 
> Cheers,
> Pritesh
> 
> On Wed, Feb 16, 2005 at 02:09:11AM -0700, Pritesh Shah wrote:
> > hi,
> >
> > I'm trying to backup a server and restore it on a different machine
> > with newer versions of postgresql and postgis. Dumps have been created
> > for the following versions from the old database server:
> >
> > Postgresql  7.4.6
> > Postgis       0.8.2
> >
> > Now since both the packages have released newer versions i've
> > installed the following on my newer machine where i would like to
> > restore the dumped databases.
> >
> > Postgresql  8.0.1 and
> > Postgis       1.0.0
> >
> > For restoring the information i'm using
> >
> > psql -e -f abc.sql template1
> >
> > While restoring the dumps i've collected the following information
> > where the problem occurs:
> >
> > ..
> > ..
> > ..
> > CREATE FUNCTION histogram2d_in(cstring) RETURNS histogram2d
> >     AS '$libdir/libpostgis.so.0.8', 'histogram2d_in'
> >     LANGUAGE c STRICT;
> > psql:abc.sql:3947: ERROR:  could not access file
> > "$libdir/libpostgis.so.0.8": No such file or directory
> > ..
> > ..
> > ..
> >
> > I understand that this is due to the following:
> >
> > libpostgis.so.8.0 is now liblwgeom.so.1.0 and also
> >
> > histogram2d_in  is now  lwhistogram2d_in
> > histogram2d_out is now lwhistogram2d_out and so on.
> >
> > Now my problem is there are a lot of databases that use the postgis
> > stuff (like the histogram2d_in) which has changed from the older
> > version to the newer version. What do i do to overcome this problem??
> > Can somebody help me out with this??
> >
> > Cheers,
> > Pritesh
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users at postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users



More information about the postgis-users mailing list