planetfederal / qgis-suite-plugin

GNU General Public License v2.0
25 stars 17 forks source link

Cannot create PostGIS table with geometries #124

Closed mweisman closed 10 years ago

mweisman commented 10 years ago

Creating a table with a geometry column fails with function addgeometrycolumn(unknown, unknown, unknown, integer, unknown, integer) does not exist LINE 1: SELECT AddGeometryColumn('public', 'test2', 'geom', -1, 'POI... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts.

Tables without geometry columns can be created.

ischneider commented 10 years ago

This appears to be an issue only when the DB does not have the extension installed.

CREATE EXTENSION postgis;

Vitruvius21 commented 6 years ago

I have the same problem

ashritha-hub commented 4 years ago

Without postgis extension in postgresSQL, if you try to add any spatial layers to postgresSQL , you get above error.

In pgadmin right click on extensions and check whether postgis extension is saved or not. if in extensions postgis option is absent ,you can follow these steps to install postgis in postgres https://www.youtube.com/watch?v=afK8GWpb8RU