Opened 18 years ago

Last modified 18 years ago

#1203 closed defect (fixed)

OGRPGTableLayer::CreateFeatureViaInsert()

Reported by: id4you@… Owned by: warmerdam
Priority: high Milestone:
Component: OGR_SF Version: unspecified
Severity: critical Keywords:
Cc: Markus 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 (1)

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

Download all attachments as: .zip

Change History (4)

by id4you@…, 18 years ago

Attachment: gdal-1.3.2.patch added

patch

comment:1 by id4you@…, 18 years ago

(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....')

comment:2 by neteler@…, 18 years ago

Frank,

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

Markus

comment:3 by warmerdam, 18 years ago

Yikes!

I have fixed this in CVS. 

Note: See TracTickets for help on using tickets.