[GRASSLIST:4351] Grass57 Vector attributes

hello,
I want to reach the following:
load Shapefiles into a Postgis DB, with Grass 57 the access to the
attributes and finally add columns or/and Attribute tables.
so far I reached the following:

- with v.in.ogr I `ve imported the Shapefile with the states of Germany to
grass57. The Shape-dbf file was automatically imported and in the folder of
the location a Grass57-dbf file was created, which has immediately a DB
connection with the Grass vector map. With v.db.connect I can examine that.
The result:
Vector map <state1> is connected by: field <1> table
<state1> in database </home/mholzmann/grassdata/deutschland/vtest/dbf/>
through driver <dbf> with key <cat>

-then I export with v.out.ogr the data into the Postgis-DB. A table in the
Postgis-DB with the following columns is put on: oid, ogc_fid, wkb_geometry,
landnr, name, ID cat. All Attribute was thus written into the table.

-with v.external now I make a Postgis-DB connection with the Layer state1.
The geometry data are o.k. but the attributes doesn`t appear. The result of
a query results in :
Cannot open select cursor:`select*from
state1 where FID=69` on database`PG:localhost....,

-with an query with v.db.connect the following appears:
Vector map<postgis_state> is connected by: field <1> table <state1> in
database
<PG:host=localhost user=postgres dbname=db2> through driver <ogr> with
key<FID>

- How can I get access to the attributes in the table?
- Who can give me a tip how the attribute management works in Grass57 and
Postgis_DB, and with commands are needed

Michael

On Wednesday 15 September 2004 13:36, Michael Holzmann wrote:

-with v.external now I make a Postgis-DB connection with the Layer
state1. The geometry data are o.k. but the attributes doesn`t appear. The
result of a query results in :
Cannot open select cursor:`select*from
state1 where FID=69` on database`PG:localhost....,

Yes, bug and difficult to resolve I think. OGR layers use FID
as link to attributes. OGR SQL doc says:
(http://gdal.maptools.org/ogr/ogr_sql.html)

| FID
|
| Normally the feature id is a special property of a feature and not treated
| as an attribute of the feature. In some cases it is convenient to be able
| to utilize the feature id in queries and result sets as a regular field.
| To do so use the name FID. The field wildcard expansions will not include
| the feature id, but it may be explicitly included using a syntax like:
|
| SELECT FID, * FROM nation

But for Postgres and other RDBMS, the query is probably passed
to the server, so the query fails, because FID field does not exist.

Frank,
how to get FID column name (pszFIDColumn, I believe)?

Radim