Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm running Natty:

Attempting to get pgAdmin III running. So I went to the pgAdmin download section for Ubuntu... but did not see Natty instructions.

So I downloaded the Natty pgAdmin III .deb from Launchpad

This fired up Ubuntu's Software Center. I installed. Everything worked.

I opened up pgAdmin III and connected to my local postGIS database successfully.

Now! I'm following along in the text PostGIS in Action and it tells me to execute:

SELECT postgis_full_version();

This of course gives the error, as per title:

ERROR:  function postgis_full_version() does not exist
LINE 1: SELECT postgis_full_version();
           ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.

********** Error **********

SQL state: 42883
Character: 8

Update: Furthermore, I ran the exact query in phpPgAdmin and got:

SQL error:

ERROR:  function postgis_full_version() does not exist
LINE 1: SELECT postgis_full_version();
           ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.

In statement:
SELECT postgis_full_version();

This is why I've placed this in the Ubuntu SE - Similar results from phpPgAdmin and pgAdmin III suggest it's not an issue with the respective GUI, but rather...the OS?

Scoured Google, can't seem to find anything related...

Thanks in advance.

share|improve this question

2 Answers 2

up vote 2 down vote accepted

Though perhaps a convoluted method, pgadmin III was indeed installed correctly using the above method. I found the issue... You must call the postgis_full_version() function on a database that has been PostGIS enabled.

To enable PostGIS on a database, you must execute the postgis.sql and spatial_ref_sys.sql queries on that database via command line by navigating to your <postgis>/<version>/contrib directory and executing:

psql -d <db_name> -f postgis.sql 

and

psql -d <db_name> -f spatial_ref_sys.sql

If you can't seem to locate these files, you can always go to your root and use the locate command:

cd /
locate postgis.sql
share|improve this answer

No need to go through all that trouble because PgAdmin III is packaged for Natty under universe

  1. Uncomment the Universe sources in /etc/apt/sources.list
  2. Run:

    apt-get update

    apt-get install pgadmin3

share|improve this answer
    
It's cool that you figured it out. –  Aleksandr Levchuk May 15 '11 at 19:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.