[GRASS-user] pg driver and views

Jarek Jasiewicz jarekj at amu.edu.pl
Fri Feb 9 12:59:06 EST 2007


Hi all
Tis is not a question, rather remark

I experiment a little with using pg views with grass
generally grass can handle views via db.select and db.execute without 
problems and warnings


It is also possible to connect vetor file to view, and use attributes of 
view as a labels etc.. It also works in qgis
I add, the view is created from two joined tables!


I can't say nothing about digitising of vector connected with view 
becouse I plan to try it soon (first I must prepare view)

Connecting vector with view gives folloowing messages:

Table <widok> does not exist in database <testy>

The table <widok> is now part of vector map <punkty_test> and may be 
deleted or overwritten by GRASS modules
DBMI-Postgres driver error:
Cannot create index:    // (jj-comment) it is because (kot) is not unique
create unique index widok_kot on widok ( kot )
ERROR:  "widok" is not a table



GRASS_INFO_WARNING(5538,3): Cannot create index

GRASS_INFO_WARNING(5538,4): Select privileges were granted on the table


As you can see first grass is "suprised" that something isn't table but 
looks similar
   Next vector is joined to view as to table: look: grass see the view 
as a table!
Next grass "concludes" that "widok" is not the table and returns error, 
but vector is joined.

I'm iterested in this so my question is very simple. Is it somewhere 
described? (anything about views in grass - simple google query returns 
nothing). I only found in help recomendation to use view in v.in.db with 
huge tables

regards
Jarek





More information about the grass-user mailing list