Ticket #1203 (closed defect: fixed)

Opened 8 years ago

Last modified 8 years ago

OGRPGTableLayer::CreateFeatureViaInsert()

Reported by: id4you@… Owned by: warmerdam
Priority: high Milestone:
Component: OGR_SF Version: unspecified
Severity: critical Keywords:
Cc: neteler

Description

The 833th line of gdal-1.3.2/ogr/ogrsf_frmts/pg/ogrpgtablelayer.cpp should be

osCommand = osCommand + "'" + pszBytea + "'";

instead of

osCommand += osCommand + "'" + pszBytea + "'";

for apparent reason.

Attachments

gdal-1.3.2.patch Download (384 bytes) - added by id4you@… 8 years ago.
patch

Change History

Changed 8 years ago by id4you@…

patch

Changed 8 years ago by id4you@…

(In reply to comment #0)
> The 833th line of gdal-1.3.2/ogr/ogrsf_frmts/pg/ogrpgtablelayer.cpp should be
> 
> osCommand = osCommand + "'" + pszBytea + "'";
> 
> instead of
> 
> osCommand += osCommand + "'" + pszBytea + "'";
> 
> for apparent reason.

The resulting SQL query looks like: INSERT INTO "table" (WKB_GEOMETRY ) VALUES
(INSERT INTO "table" (WKB_GEOMETRY ) VALUES ('\\001\\002....')

Changed 8 years ago by neteler@…

Frank,

here is the related discussion:
 http://grass.itc.it/pipermail/grass-dev/2006-June/023841.html

Markus

Changed 8 years ago by warmerdam

Yikes!

I have fixed this in CVS. 

Note: See TracTickets for help on using tickets.