[postgis-users] pg-dump from postgis 0.8 to 0.9.1

strk at refractions.net strk at refractions.net
Wed Dec 15 01:37:04 PST 2004


On Wed, Dec 15, 2004 at 10:28:55AM +0100, TECHER Jean David wrote:
> Hi Ethan
> 
> I don't think that's a great idea to dump postgis functions since postgis
> functions are in a librairy
> 
> First of all, dumping implies that you need to updates version so
> uninstalling old version (postgis, geos and so on...)...
> 
> Perhaps some functions could diseappear in a new postgis version
> (truly_inside(),....)...
> 
> I don't want to do errors....

The postgis_restore.pl 'strips' postgis objects out of a dump.
In order to avoid leaving in obsoleted functions these have been
hard-coded in the script.
Looking at 'KEEPING' lines of the log file you can see what's
kept and verify you didn't include something undesiderable.
Note that if you made any extension to postgis that extension
will be kept even if relying on an older internal representation
of postgis.

Also note that a *new* database will be created by the script
(you give it name of the new database) so you can test it before
putting it in production, the database you 'dumped' from is untouched.

WARNING: if you provide the name of an existing database for restoring
         results are unpredicted (mm.. must fix this).

--strk;

> ----------------------------------------------------------------
> TECHER Jean David
> Responsable Informatique 01MAP
> e-mail: davidtecher at yahoo.fr
> site perso : http://techer.pascal.free.fr/postgis/
> site pro: http://www.01map.com/download/
> K-S:"The greatest trick the devil pulled off was convincing people he didn't
> exist"
> ------------------------------------------------------------
> ----- Original Message -----
> From: <strk at refractions.net>
> To: "Ethan Alpert" <ealpert at digitalglobe.com>
> Cc: "PostGIS Users Discussion" <postgis-users at postgis.refractions.net>
> Sent: Tuesday, December 14, 2004 8:20 PM
> Subject: Re: [postgis-users] pg-dump from postgis 0.8 to 0.9.1
> 
> 
> > On Tue, Dec 14, 2004 at 12:13:16PM -0700, Ethan Alpert wrote:
> > >
> > > Hey now...that's sweet! Now do you have a select that will filter out
> all the postgis functions when you dump the schema?
> > >
> > > -e
> >
> > functions, types, operators, operator classes, aggregates.
> > The more people test it the more we'll get it stable.
> > --strk;
> >
> > >
> > > -----Original Message-----
> > > From: postgis-users-bounces at postgis.refractions.net
> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of TECHER
> Jean David
> > > Sent: Tuesday, December 14, 2004 7:48 AM
> > > To: PostGIS Users Discussion
> > > Subject: Re: [postgis-users] pg-dump from postgis 0.8 to 0.9.1
> > >
> > >
> > > One way
> > >
> > > In a SQL file (example toto.sql), writes this
> > >
> > > select 'pg_dump -c -O -t ' || tablename || '  your_database >> dump .sql
> ' from pg_tables  where  (tablename not like 'pg_%') and (tablename not like
> 'sql_%') (tablename not like 'spatial_ref_sys_%')
> > >
> > > then do
> > >
> > > psql -d your_database -f toto.sql  > dump.sh
> > >
> > > dropdb your_database
> > > createdb your_database
> > > createlang plpgsql your_database
> > > psql -d your_database  -f postgis.sql
> > > ./dump.sh
> > > ----------------------------------------------------------------
> > > TECHER Jean David
> > > Responsable Informatique 01MAP
> > > e-mail: davidtecher at yahoo.fr
> > > site perso : http://techer.pascal.free.fr/postgis/
> > > site pro: http://www.01map.com/download/
> > > K-S:"The greatest trick the devil pulled off was convincing people he
> didn't exist"
> > > ------------------------------------------------------------
> > > ----- Original Message -----
> > > From: "Guillaume SUEUR (Géosignal)" <guillaume.sueur at geosignal.fr>
> > > To: "PostGIS Users Discussion" <postgis-users at postgis.refractions.net>
> > > Sent: Tuesday, December 14, 2004 3:37 PM
> > > Subject: Re: [postgis-users] pg-dump from postgis 0.8 to 0.9.1
> > >
> > >
> > > > -t pour la table, -d pour les inserts
> > > >
> > > >
> > > > TECHER Jean David wrote:
> > > > > ***********************
> > > > > Your mail has been scanned by InterScan VirusWall.
> > > > > ***********-***********
> > > > >
> > > > >
> > > > > what are options you use with pg_dump???
> > > > > ----------------------------------------------------------------
> > > > > TECHER Jean David
> > > > > Responsable Informatique 01MAP
> > > > > e-mail: davidtecher at yahoo.fr
> > > > > site perso : http://techer.pascal.free.fr/postgis/
> > > > > site pro: http://www.01map.com/download/
> > > > > K-S:"The greatest trick the devil pulled off was convincing people
> > > > > he
> > > didn't
> > > > > exist"
> > > > > ------------------------------------------------------------
> > > > > ----- Original Message -----
> > > > > From: "Guillaume SUEUR (Géosignal)" <guillaume.sueur at geosignal.fr>
> > > > > To: "PostGIS Users Discussion"
> > > > > <postgis-users at postgis.refractions.net>
> > > > > Sent: Tuesday, December 14, 2004 3:29 PM
> > > > > Subject: [postgis-users] pg-dump from postgis 0.8 to 0.9.1
> > > > >
> > > > >
> > > > >
> > > > >>Hi,
> > > > >>
> > > > >>I've dumped my database to load it into a new one with postgis
> > > > >>0.9.1. On the psql -d database -f dumpFile.sql, for all spatial
> > > > >>table i've got a 'couldn't parse objetcs in geometry'
> > > > >>
> > > > >>Any idea ?
> > > > >>
> > > > >>Thanks
> > > > >>--
> > > > >>---------------------------
> > > > >>Guillaume SUEUR
> > > > >>GEOSIGNAL - Groupe BVA
> > > > >>25bis Avenue Marcel Dassault
> > > > >>31505 TOULOUSE CEDEX 5
> > > > >>----------------------------
> > > > >>
> > > > >>_______________________________________________
> > > > >>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
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > > --
> > > > ---------------------------
> > > > Guillaume SUEUR
> > > > GEOSIGNAL - Groupe BVA
> > > > 25bis Avenue Marcel Dassault
> > > > 31505 TOULOUSE CEDEX 5
> > > > ----------------------------
> > > >
> > > > _______________________________________________
> > > > 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
> > > _______________________________________________
> > > 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
> 
> 
> _______________________________________________
> 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