[GRASSLIST:5549] v.db.connect problem

Francesco Mirabella mirabell at unipg.it
Fri Jan 28 04:37:52 EST 2005


Hi users,
I have a problem with v.db.connect (grass6beta1 upadate last tuesday)

-I have a postgress dbase, I am a user allowed to create dbases.

-I have imported a 3d map (ascii text) with v.in.ascii:
<v.in.ascii -z input=LatLon_AC_thous_pipe.dat output=prova columns="x double precision, y double precision, z double precision, cat int" x=2 y=3 z=4 cat=1>

-first I connect and login to the dbase:
<db.login driver=pg database=test_points> 
(the dbase user is the same as the machine user>

<db.connect driver=pg database=test_points>

-Then I want the imported ascii map to be linked to my dbase:
<v.db.connect -o  map=prova driver=pg database=test_points table=test3>

this is the output of v.db.connect:
--------------------------------------------
GRASS 6.0.cvs:~ > v.db.connect -o  map=prova driver=pg database=test_points  table=test3
WARNING: Table <test3> does not exist in database <test_points>
WARNING: The table <test3> is now part of vector map <prova>
         and may be deleted or overwritten by GRASS modules.
GRASS 6.0.cvs:~ >
--------------------------------------------



when I query my map <d.what.vect> I get:
--------------------------------------------
GRASS 6.0.cvs:~ > d.what.vect 
Building spatial index ...
 100%

 Buttons
  Left:  what's here
   Right: quit
   DBMI-Postgres driver error:
   Cannot select: 
   select * from test3 where cat = 41
  ERROR:  Relation "test3" does not exist


WARNING: Cannot open select cursor
--------------------------------------------




and the form displayed is:
--------------------------------------------
map: 'prova'
mapset: 'PERMANENT'
feature type: Point
Point height: -5280.000000

	Layer: 1
	category: 41
	driver: pg
	database: test_points
	table: test3
	key column: cat
	Cannot open select cursor:
	'select * from test3 where cat = 41'
	on database 'test_points' by driver 'pg'
--------------------------------------------

So, some info in the form exist (e.g. depth of the point) and according to v.db.connect the table3 is created, but when accessing the dbase with pgaccess the table does not exist!!!

Can someone tell me where I am wrong???

Francesco




More information about the grass-user mailing list