[postgis-tickets] [PostGIS] #2503: ERROR: table "topology" is not a member of the extension being created

PostGIS trac at osgeo.org
Sat Oct 13 12:18:25 PDT 2018


#2503: ERROR:  table "topology" is not a member of the extension being created
------------------------------------+---------------------------
  Reporter:  strk                   |      Owner:  robe
      Type:  defect                 |     Status:  reopened
  Priority:  medium                 |  Milestone:  PostGIS 2.1.1
 Component:  build/upgrade/install  |    Version:  trunk
Resolution:                         |   Keywords:  extension
------------------------------------+---------------------------

Comment (by strk):

 The postgis_topology--unpackaged--3.0.0dev.sql script
 contains these lines:

 {{{
 DO $$
 BEGIN
  ALTER EXTENSION postgis_topology ADD TABLE topology.layer;
  RAISE NOTICE 'newly registered TABLE topology.layer';
 EXCEPTION WHEN object_not_in_prerequisite_state THEN
   IF SQLERRM ~ '\mpostgis_topology\M'
   THEN
     RAISE NOTICE 'already registered TABLE topology.layer';
   ELSE
     RAISE EXCEPTION '%', SQLERRM;
   END IF;
 END;
 $$ LANGUAGE 'plpgsql';
 DO $$
 BEGIN
  ALTER EXTENSION postgis_topology ADD TABLE topology.topology;
  RAISE NOTICE 'newly registered TABLE topology.topology';
 EXCEPTION WHEN object_not_in_prerequisite_state THEN
   IF SQLERRM ~ '\mpostgis_topology\M'
   THEN
     RAISE NOTICE 'already registered TABLE topology.topology';
   ELSE
     RAISE EXCEPTION '%', SQLERRM;
   END IF;
 END;
 $$ LANGUAGE 'plpgsql';
 }}}

 But they are at the end of the file.
 If I move them at the beginning, right after the lines with
 {{{
 postgis_extension_remove_objects
 }}}

 Then CREATE .. FROM unpackaged works great !

 Regina, cannot you reproduce on your system ?
 This is with PostgreSQL 9.6.9.

 I guess the parser is complaining about code in function body
 writing into topology.topology _BEFORE_ that table is
 registered with the extension (not sure)

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/2503#comment:16>
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