My features of a PostGIS layer are displayed in the map canvas in QGIS and projected properly at the right place.

They are not selectable in graphically in the map. But they are selectable in attribute table.

So it does not seem to be a problem of granting rights to select/edit the data.

My PostgreSQL 12 server contains 2 databases. All tables of all schemas of just one from the databases show these behaviour. In the other database every geodata-behavoiur is as expected in QGIS.

Inserting test data/tables in the PostgreSQL scheme via QGIS-database-export throws following exception: Function addgeometrycolumn(unknown, unknown, unknown, integer, unknown, integer) is not unique.

(It's no problem to create (new) views within the misbehaving scheme)

Any idea what went wrong and how to fix it?

  • Do you have geometries with different SRIDs in your table? Is the SRID clearly defined in your PostGIS table? Jan 15, 2020 at 7:16
  • I think so. Every geometrycolumn is created in a view like CREATE OR REPLACE VIEW myscheme.myview AS SELECT …mycontent st_geometryfromtext(((('POINT ('::text || table.x_coord) || ' '::text) || table.y_coord) || ')'::text, 25832) AS the_geom FROM myscheme.mytable table;
    – user191847
    Jan 16, 2020 at 6:12
  • QGIS project is in 25832 too. Have got just one table (i.e. the view above) in a sample project
    – user191847
    Jan 16, 2020 at 6:14

1 Answer 1


We solved the problem: During a database-upgrade from pg 9.1 to pg 12 some of the "old" postgis functions were restored to the new database. After creating the new postgis-extension we had some functions twice or more times, which led to the problems.

To solve the issue we created a new database with a fresh postgis-extension and transferred just the data without any functions.

  • You can accept your answer with the checkbox
    – BERA
    Nov 4, 2020 at 11:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.