This is a follow up on a previous question on the storage of vectors layers imported from PostGIS.

To importing a spatial table from PostGIS I use, sucessfully, the following formulation with v.in.ogr:

> v.in.ogr input="PG:host=pg-server dbname=dsm user=duque004 password=secret" layer="observations.profiles" output=profiles -o
Over-riding projection check
Check if OGR layer <observations.profiles> contains polygons...
ERROR 1: Could not fetch SRS: 
Creating attribute table for layer <observations.profiles>...
Importing 141584 features (OGR layer <observations.profiles>)...
Building topology for vector map <profiles@test>...
Registering primitives...

But if I feed the same parameters to db.in.ogr, it fails to find the table:

> db.in.ogr input="PG:host=pg-server dbname=dsm user=duque004 password=secret" db_table="observations.profiles" output=profiles
ERROR: Unable to open data source <observations.profiles>
ERROR: Input table <observations.profiles> not found or not

What is going on here?

Edit: these outputs report to GRASS 7.6.0

Update 01-05-2019: This issue is now reported in ticket 3836.

  • in your PG: portion, can you try to add schemas=observations and then just use db_table=profiles
    – SaultDon
    Commented Mar 22, 2019 at 23:19
  • Please tell us which GRASS GIS version you use
    – markusN
    Commented Mar 24, 2019 at 21:31
  • @SaultDon schemas is not a valid parameter; neither is schema. Commented Mar 26, 2019 at 9:14
  • @markusN I am working with GRASS 7.6.0, I updated the answer. Commented Mar 26, 2019 at 9:15

1 Answer 1


I think you are hit by a SQL restriction:

No dots are allowed as SQL does not support '.' (dots) in table names.

See also the related help text at:


  • observations is the name of the schema where the table resides; the name of the table in question is simply profiles. As far asI know, there is no other way to pass the database schema in the connection string. In Postgres and Oracle every table must be in a schema, this dot might not be avoidable. Commented Apr 25, 2019 at 11:48
  • I'd suggest to open a ticket at trac.osgeo.org/grass to get this clarified.
    – markusN
    Commented Apr 25, 2019 at 15:44

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.