[postgis-users] problems with 2.1.2 and new databases

Paragon Corporation lr at pcorp.us
Wed Apr 9 21:05:06 PDT 2014


Jay,
 
I haven't tested 2.1.2 on a virgin 9.2 install though I upgraded my existing
9.2 windows 64-bit and create a new db no problem and upgraded my existing
dbs with ALTER EXTENSION postgis...
Yah I never bother with the "Create spatial database". Was thinking of
removing that in 2.2 though I guess some may find it useful, but then I'll
make user name/password stuff conditional on that.
 
1) You might want to try right-clicking -- Extension add-> postgis  via
pgAdmin to see if you see the option at all and when you choose it it gives
an immediate error if there is an issue.
 
Usually when I see this not working -- the culprit often is one of 2 things
 
a) for whatever reason your extension files or postgis.control is not in the
right location -- this usually only happens with copy fail
b) more commonly 
you connected with postgres account in psql and you didn't switch to connect
to the new database before you ran CREATE EXTENSION, so postgis ends up
being installed in the postgres database
where its of course no use.
 
Hope that helps,
Regina

  _____  

From: postgis-users-bounces at lists.osgeo.org
[mailto:postgis-users-bounces at lists.osgeo.org] On Behalf Of Jay Moss
Sent: Wednesday, April 09, 2014 12:59 PM
To: postgis-users at lists.osgeo.org
Subject: [postgis-users] problems with 2.1.2 and new databases


I've got a problem with the new 2.1.2 release.  If I upgrade in place
everything appears fine.   

BUT, if I'm installing a new db server (PostgreSQL 9.2.8.2, 64bit, windows),
the create script that I have been using successfully with previous versions
now fails (in step 5 below) with the following error: 

    PostGIS is already installed in schema 'public', uninstall it first

Here's my installation process and what's failing:

   1. create a new db using createdb.exe.
   2. spatially enable it using psql and "CREATE EXTENSION postgis".
   3. create some permissions, groups, and roles, and grant access to the
db...
   4. update the postgressql search path to add my new db at the front of
the list.
   5. run  \share\contrib\postgis-2.1\postgis.sql  -  FAILS
   6. run  \share\contrib\postgis-2.1\spatial_ref_sys.sql
   7. run  \share\contrib\postgis-2.1\postgis_comments.sql

I've tried removing the postgis scripts (all 3) and if I do that, my
database does not appear to actually work with the spatial datatypes - I get
errors that my geometry columns datatype isn't defined.  The second and
third script appear to be dependent on the first.

One other item of note: When I install PostGIS, I'm NOT checking the "create
spatial database" option. I don't really want the sample db's on my servers
- I just want the one I create to be spatially enabled.

thanks in advance
j
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20140410/2957e2d5/attachment.html>


More information about the postgis-users mailing list