[postgis-users] cannot drop function addgeometrycolumn

Jake O'brien Fagan jake at househappy.org
Thu Oct 16 12:02:23 PDT 2014


Howdy Gang,

Sorry if this question has been answer, but I've been searching all morning
and nothing has produced results so far. When running a Rails migration, I
received the following error:

 ** [out :: staging-two.fart.org] ActiveRecord::
StatementInvalid: PG::AmbiguousFunction: ERROR:  function
addgeometrycolumn(unknown, unknown, integer, unknown, integer) is not unique
 ** [out :: staging-two.fart.org] LINE 1: SELECT
AddGeometryColumn('boundaries', 'boundary', 4326, 'PO...
 ** [out :: staging-two.fart.org] ^
 ** [out :: staging-two.fart.org] HINT:  Could not choose a best candidate
function. You might need to add explicit type casts.


After some time on the Postgis IRC, a nice fellow told me to run `psql -d
fart_staging -f postgis_upgrade_21_minor.sql`. However, that returned:

DROP FUNCTION
psql:postgis_upgrade_21_minor.sql:53: ERROR:  cannot drop function
addgeometrycolumn(character varying,character varying,character
varying,character varying,integer,character varying,integer,boolean)
because extension postgis requires it
HINT:  You can drop extension postgis instead.


Here is some relative info on my installation:

househappy_staging=# SELECT PostGIS_full_version();

postgis_full_version
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 POSTGIS="2.1.3 r12547" GEOS="3.3.3-CAPI-1.7.4" PROJ="Rel. 4.7.1, 23
September 2009" GDAL="GDAL 1.9.0, released 2011/12/29" LIBXML="2.8.0"
LIBJSON="UNKNOWN" TOPOLOGY RASTER
(1 row)

househappy_staging=# select version();
                                           version
----------------------------------------------------------------------------------------------
 PostgreSQL 9.3.5 on x86_64-unknown-linux-gnu, compiled by gcc (Debian
4.7.2-5) 4.7.2, 64-bit
(1 row)

Can anyone help me understand and debug this issue? I have for sure updated
my postgis and postgresql a few time over the last two years starting with
9.0.

------------------------------

Jake O'Brien Fagan

Ruby Engineer
househappy.org <http://www.househappy.org/>
Facebook <https://www.facebook.com/househappy.org> | Twitter
<https://twitter.com/househappy> | Instagram
<http://instagram.com/househappy>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20141016/f7e5de86/attachment.html>


More information about the postgis-users mailing list