[postgis-users] Install PostGIS from a server script?

david techer davidtecher at yahoo.fr
Mon Oct 10 16:34:06 PDT 2005


Hi

This should not be the better solution...but I think U should try using a Template from postgresql

On Server:

Try to make a template called 'mytemplate'

createdb mytemplate

createlang plpgsql mytemplate

psql -d mytemplate -f /path/to/lwpostgis.sql

psql -d mytemplate -f /path/to/spatial_ref_sys.sql

But don't do this on template0 or template1! template0 is needed by PostgreSQL.
If U do this on template1 U should have to reinitialize template1 later using initdb if 
U do something like upgrading.

Then on Client (Windows):

in order to create a DataBase called 'mydb' with postgis function:

createdb -T mytemplate mydb

Actually there is few commands for mytemplate being "frozen" but I don't remember this...

Perhaps should U see postgresql doc.

--david;
-------------------------------------------------
Jean David TECHER
e-mail: davidtecher(at)yahoo(dot)fr
site: http://techer.pascal.free.fr/postgis/
-------------------------------------------------

Charlie Savage a écrit :Is it possible for a postgresql server to run a script stored on the 
server, and not on a client?

>More specifically, I have a Linux server (running postgresql 8.1 beta2 
>and the CVS HEAD of postgis) and a Windows client.
>  
>
>From the windows client I would like to be able to create a database, 
>install POSTGIS, and then create various tables/objects and load data.
>  
>
>I run into problems when trying to install postgis from the windows 
>client because obviously "psql -d [yourdatabase] -f lwpostgis.sql" 
>doesn't work because lwpostgis.sql is on the server (and even if it was 
>one the client it specifies $libdir/liblwgeom.dll instead of 
>$libdir/liblwgeom.so).
>  
>
>Is it possible to do this, or is it disallowed for security reasons?
>  
>
>Charlie
>  
>
>_______________________________________________
>  
>
>postgis-users mailing list
>  
>
>postgis-users at postgis.refractions.net
>  
>
>http://postgis.refractions.net/mailman/listinfo/postgis-users
>  
>
>

	

	
		
___________________________________________________________________________ 
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger 
Téléchargez cette version sur http://fr.messenger.yahoo.com



More information about the postgis-users mailing list