[postgis-users] new user = new problems

Mike Leahy mgleahy at alumni.uwaterloo.ca
Wed May 24 10:06:48 PDT 2006


Matteo,

If you want every new database you create to have PostGIS installed, 
then you can load lwpostgis.sql and spatial_ref_sys.sql into the 
'template1' database.  The 'template1' database is used as the default 
blank database that new databases are created from.  This is probably 
the easiest approach if you expect every database you create to be used 
for storing spatial data with PostGIS.  You just have to remember that 
if you ever upgrade PostGIS, you'll have to update each PostGIS 
database, as well as template1.

Good luck,
Mike



matteo rossi wrote:
> Mike,
> I did exactly what you wrote.
> But I'd like to understand why the database I create on postgis are not 
> directly Spatial Database....
> 
> thanks
> Matteo
> 
> Mike Leahy wrote:
> 
>> Matteo,
>>
>> Try putting a full or relative path to the sql files like this:
>>
>> psql -d yourtestdatabase -f ../share/contrib/lwpostgis.sql
>> psql -d yourtestdatabase -f ../share/contrib/spatial_ref_sys.sql
>>
>> Regards,
>> Mike
>>
>> matteo rossi wrote:
>>
>>> Hi,
>>> I recently installed postgre 8.1 with postgis 1.1.2-1 for windows xp.
>>> I experienced many problems in following the steps suggested into the 
>>> postgis manual uploaded in postgis site, especially about importing 
>>> shapefiles, as it should concern other version than mine.
>>> The first problem if when I use the psql, the database created is NOT 
>>> a spatial database but a simple postgres one.
>>> How I can transform it in a spatial one?
>>> How can I directly create a spatial database?
>>> I tried with
>>>
>>> |psql -d yourtestdatabase -f lwpostgis.sql
>>> psql -d yourtestdatabase -f spatial_ref_sys.sql
>>>
>>> but the "psql" command and the *.sql files are not under the same 
>>> directory, so the shell don't recognize them.
>>>
>>> Can anyone help me?
>>>
>>> Thanks a lot
>>>
>>> matteo rossi
>>>
>>>
>>> |
>>>
>> _______________________________________________
>> 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