[postgis-tickets] [PostGIS] #3494: fully-qualified operators/functions - problems during a restore of a logical dump

PostGIS trac at osgeo.org
Mon Aug 8 13:45:46 PDT 2016


#3494: fully-qualified operators/functions - problems during a restore of a
logical dump
-------------------------+-------------------------------------------------
  Reporter:  gbroccolo   |      Owner:  pramsey
      Type:              |     Status:  closed
  enhancement            |
  Priority:  low         |  Milestone:  PostGIS PostgreSQL
 Component:  postgis     |    Version:  2.2.x
Resolution:  fixed       |   Keywords:  fully-qualified, operators,
                         |  functions
-------------------------+-------------------------------------------------

Comment (by gbroccolo):

 Hi Regina, I've tried with this simple example (that is really similar to
 the real case when I opened the ticket), once I compiled PostGIS
 considering commit 7880db5:

 ~$ psql -c "CREATE DATABASE geotest"
 CREATE DATABASE
 ~$ psql -c "CREATE SCHEMA geo" geotest
 CREATE SCHEMA
 ~$ psql -c "ALTER DATABASE geotest SET search_path TO geo"
 ALTER DATABASE
 ~$ psql -c "CREATE EXTENSION postgis" geotest
 CREATE EXTENSION
 ~$ psql -c "CREATE TABLE geo.tab(i int PRIMARY KEY, g geometry CHECK (g &&
 ST_MakePolygon(ST_GeomFromText('LINESTRING(75.15 29.53,77 29,77.6 29.5,
 75.15 29.53)'))))" geotest
 CREATE TABLE
 ~$ psql -c "INSERT INTO tab VALUES (0, ST_MakeLine(ST_MakePoint(0,0),
 ST_MakePoint(100,100)))" geotest
 INSERT 0 1
 ~$ pg_dump -Fc geotest > geotest.dump
 ~$ psql -c "DROP DATABASE geotest"
 DROP DATABASE
 ~$ psql -c "CREATE DATABASE geotest"
 CREATE DATABASE
 ~$ pg_restore -d geotest geotest.dump

 All worked fine - when I opened the ticket, I obtained the error "operator
 && does not exists". I've tried also with the postgis_topology extension
 installed:

 ~$ psql -c "CREATE DATABASE geotest"
 CREATE DATABASE
 ~$ psql -c "CREATE SCHEMA geo" geotest
 CREATE SCHEMA
 ~$ psql -c "ALTER DATABASE geotest SET search_path TO geo"
 ALTER DATABASE
 ~$ psql -c "CREATE EXTENSION postgis" geotest
 CREATE EXTENSION
 ~$ psql -c "CREATE EXTENSION postgis_topology" geotest
 CREATE EXTENSION
 ~$ psql -c "CREATE TABLE geo.tab(i int PRIMARY KEY, g geometry CHECK (g &&
 ST_MakePolygon(ST_GeomFromText('LINESTRING(75.15 29.53,77 29,77.6 29.5,
 75.15 29.53)'))))" geotest
 CREATE TABLE
 ~$ psql -c "INSERT INTO tab VALUES (0, ST_MakeLine(ST_MakePoint(0,0),
 ST_MakePoint(100,100)))" geotest
 INSERT 0 1
 ~$ pg_dump -Fc geotest > geotest.dump
 ~$ psql -c "DROP DATABASE geotest"
 DROP DATABASE
 ~$ psql -c "CREATE DATABASE geotest"
 CREATE DATABASE
 ~$ psql -c "ALTER DATABASE geotest SET search_path TO geo,topology"
 ALTER DATABASE
 ~$ pg_restore -d geotest geotest.dump

 And all worked properly. So I think that the issue is solved, thanks.

 BTW: I encountered the same issue reported in the pull request 113, and
 fixed it in the same way.

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