I'm using a database created in the PostgreSQL. In its schema there are two tables and in one of them I want to add a geometry
column.
The problem is that I created the postgis Extension (CREATE EXTENSION postgis;
) for the database, but I'm not able to add this data type (geometry) column using pgAdmin.
To do this with pgAdmin's "New Column..." dialog, if you can't find geometry
, then you might be able to find public.geometry
instead (if PostGIS was installed there, which is normal).
However, I advise against using pgAdmin for creating geometry columns, as it does not understand typmods used to define the geometry type and SRID.
The best way is using DDL to directly manipulate the table, e.g.:
ALTER TABLE locations ADD COLUMN geom geometry(PointZ,4326);
to add a geom
column of XYZ points (long, lat, alt).