Postgis / Geodjango: Cannot determine PostGIS version for database

后端 未结 5 1843
天涯浪人
天涯浪人 2021-02-01 16:32

I\'m attempting to launch a GeoDjango app. I\'ve installed Postgres & PostGIS using brew on Lion. I created a database using template_postgis: createdb -T template_pos

5条回答
  •  忘了有多久
    2021-02-01 16:54

    As a first debugging step: try to check the postgis template version manually, e.g. on the command-line connect to your database with psql test, and query with select postgis_lib_version();. This function should be defined in template_postgis and return some number. Example output:

    $ psql test
    psql (9.0.4)
    Type "help" for help.
    
    test=# select postgis_lib_version();
    
     postgis_lib_version
    ---------------------
     1.5.2
    (1 row)
    

    If an error occurs, you know the error is in the database.

提交回复
热议问题