title: PostgreSQL (shp2pgsql) AddGeometryColumn gives "No function matches the given name"
body: <p>I'm working with the <a href="http://www.databasin.org/protected-center/features/PAD-US-CBI/download" rel="nofollow">PADUS OBI shape file</a>, not that that's probably important.</p>
  
  <p>I'm running the shape file through shp2pgsql using the default options, as in:</p>
  
  <pre><code>shp2pgsql PADUS_1_1_CBI_Edition.shp &gt; PADUS.sql
  </code></pre>
  
  <p>Then I'm trying to import the SQL into Postgres by doing:</p>
  
  <pre><code>psql -d padusdb -f PADUS.sql
  </code></pre>
  
  <p>And getting the following error:</p>
  
  <pre><code>psql:PADUS.sql:36: ERROR:  function addgeometrycolumn(unknown, unknown, unknown, unknown, unknown, integer) does not exist
  LINE 1: SELECT AddGeometryColumn('','padus_1_1_cbi_edition','the_geo...
  HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
  </code></pre>
  
  <p>I have PostGIS installed.</p>
  
  <p>The SQL commands leading to the error (being put into an otherwise empty database) are:</p>
  
  <pre><code>SET CLIENT_ENCODING TO UTF8;
  SET STANDARD_CONFORMING_STRINGS TO ON;
  BEGIN;
  CREATE TABLE "padus_1_1_cbi_edition" (gid serial PRIMARY KEY,
  "us_id" int4,
  "category" varchar(10),
  "gis_acres" numeric,
  ...
  BUNCH OF COLUMNS, none of which is called "the_geom"
  ...
  "comments" varchar(200),
  "shape_leng" numeric,
  "shape_area" numeric);
  SELECT AddGeometryColumn('','padus_1_1_cbi_edition','the_geom','-1','MULTIPOLYGON',2);
  COMMIT;
  </code></pre>
  
  <p>Any thoughts on what this might mean and how to resolve the problem?</p>