[PostGIS] #6059: AddGeometryColumn calls postgis_type_name without @extschema@ prefix

PostGIS trac at osgeo.org
Mon Mar 23 03:45:25 PDT 2026


#6059: AddGeometryColumn calls postgis_type_name without @extschema@ prefix
---------------------+---------------------
 Reporter:  fthomas  |      Owner:  pramsey
     Type:  defect   |     Status:  new
 Priority:  medium   |  Milestone:
Component:  postgis  |    Version:  3.6.x
 Keywords:           |
---------------------+---------------------
 [https://gitea.osgeo.org/postgis/postgis/src/commit/d63430387663f34c6edccac1bff47a5cf484d4c8/postgis/postgis.sql.in#L2363-L2530
 AddGeometryColumn] calls postgis_type_name without the @extschema@ prefix
 in
 [https://gitea.osgeo.org/postgis/postgis/src/commit/d63430387663f34c6edccac1bff47a5cf484d4c8/postgis/postgis.sql.in#L2393
 postgis.sql.in#L2393]. Other PostGIS function calls are qualified with the
 @extschema@ prefix, like ST_SRID in
 [https://gitea.osgeo.org/postgis/postgis/src/commit/d63430387663f34c6edccac1bff47a5cf484d4c8/postgis/postgis.sql.in#L2435
 postgis.sql.in#L2435] or even postgis_type_name in
 [https://gitea.osgeo.org/postgis/postgis/src/commit/d63430387663f34c6edccac1bff47a5cf484d4c8/postgis/postgis.sql.in#L2478
 postgis.sql.in#L2478].

 Now, if !AddGeometryColumn is used qualified with the schema it is
 installed in but this schema is not on the
 [https://www.postgresql.org/docs/current/ddl-schemas.html#DDL-SCHEMAS-PATH
 search path], it fails because of the unqualified postgis_type_name call:

 {{{ERROR: function postgis_type_name(character varying, integer) does not
 exist}}}

 I guess prefixing postgis_type_name with @extschema@ would fix this error.
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/6059>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list