[GRASS-dev] Re: [GRASS-CVS] markus: grass6/lib/vector/Vlib field.c, 1.38, 1.39

Markus Neteler neteler at itc.it
Sat Jun 17 09:22:58 EDT 2006


On Wed, Jun 14, 2006 at 04:15:34PM -0500, Huidae Cho wrote:
> On Wed, Jun 14, 2006 at 10:59:35PM +0200, Markus Neteler wrote:
> > On Tue, Jun 13, 2006 at 11:41:05PM -0500, Huidae Cho wrote:
...
> > > FYI, find attached the patch for gdal-1.3.2.
> > 
> > Could you tell me more about this patch? Needed to make
> > PG support functioning?
> > 
> >  thanks
> > 
> >  Markus
> 
> Markus,
> 
> I checked if v.info worked with a v.externaled PostgreSQL vector and,
> unfortunately, it didn't:
> 
> GRASS 6.1.cvs (Bryan):~/tmp > v.info tmp
> D1/3: Vect_open_old(): name = tmp mapset= PERMANENT update = 0
> D1/3: Vect_set_thresh(): thresh = 0.000000
> D3/3: dig_init_plus()
> D1/3: dig_spidx_init()
> D3/3: dig_cidx_init()
> D1/3: open format file: 'PERMANENT/vector/tmp/frmt'
> D3/3: dig_read_frmt_ascii()
> D1/3: Vector format: 1 (non-native)
> D1/3: Vect_set_thresh(): thresh = 0.000000
> D1/3: Vect__read_head(): vector = tmp at PERMANENT
> D1/3: Vect_set_thresh(): thresh = 0.000000
> D1/3: Level request = 2
> D1/3: Vect_open_topo(): name = tmp mapset= PERMANENT
> D1/3: Topo file for vector 'tmp at PERMANENT' not available.
> D2/3: G__home home = /home/hcho
> ERROR: Cannot open old vector tmp at PERMANENT on level 2
> GRASS 6.1.cvs (Bryan):~/tmp >
> 
> Without the attached patch, the resulting SQL query from v.out.ogr will look
> like (invalid SQL query):
> 
> INSERT INTO "table" (WKB_GEOMETRY ) VALUES (INSERT INTO "table" (WKB_GEOMETRY )
> VALUES ('\\001\\002....')
> 
> because osCommand already has "INSERT INTO 'table' (WKB_GEOMETRY ) VALUES (" in
> it and it's appended to itself again by "osCommand += osCommand ...", which I
> fixed.  Note "INSERT INTO" command after the first VALUES.  This bug has been
> reported to the gdal bugzilla.

The fix has been applied to GDAL-CVS.

Markus




More information about the grass-dev mailing list