GRASS GIS 8 Programmer's Manual  8.4.0dev(2024)-eff64031f2
GRASS-PostGIS data provider

by GRASS Development Team (


GRASS-PostGIS data provider allows GRASS vector library to read and write PostGIS data directly without any external library (like in the case of GRASS-OGR data provider). GRASS-PostGIS data provider is implemented using libpq library.

Note that GRASS-PostGIS data provider is compiled only when GRASS is configured with –with-postgres switch.

See the trac page for more info.

List of functions

Note that the functions listed below are lower level subroutines, in other word these functions are not considered to be part of public API. They are internally used by the vector library when accessing PostGIS data. The programmer should use higher level functions instead.

Note that functions with V1_ prefix access vector data without topology. Topological (pseudo-topological for simple features) access is provided by functions starting with V2_ prefix.

Open/Create PostGIS table as GRASS vector map
Read access
Write new feature or topological element
Delete existing feature or topological element
Modify existing feature or topological element
Build topology

See Also


Martin Landa <landa.martin>