Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#5845 closed defect (fixed)

Allow creating a field with same name as FID column in SQLite, GPKG and PG drivers

Reported by: Even Rouault Owned by: Even Rouault
Priority: normal Milestone: 2.0.0
Component: OGR_SF Version: unspecified
Severity: normal Keywords: fid
Cc: jpalmer

Description

Let's say you have test.csv with

bla,id,WKT
"a",10,"POINT(0 1)"

and test.csvt with:

String,Integer,String

currently "ogr2ogr -f SQLite test.sqlite test.csv -lco FID=id" does not work since it tries to create another column as the FID column.

Change History (7)

comment:1 Changed 7 years ago by Even Rouault

trunk r28515 "SQLite: in a newly created table, allow to create a integer field with same name of FID column (#5845)"

comment:2 Changed 7 years ago by Even Rouault

trunk r28517 "GPKG, PG, PGDump: in a newly created table, allow to create a integer field with same name of FID column (#5845)"

trunk r28518 "ogr2ogr: when copying a layer that has a source integer/integer64 field with same name as target FID column, avoid creating it into target layer and use its content as the FID value (#5845)"

comment:3 Changed 7 years ago by Even Rouault

trunk r28521 "PG: revert recent commit, in order to use against INSERT on existing layers (#5845)"

comment:4 Changed 7 years ago by Even Rouault

trunk r28522 "OGR VRT: add an optional 'name' attribute on FID element, so as to be able to force the report of a FID column name even if it is not exposed as a regular field (related to #5845)"

trunk r28523 "ogr2ogr: in non-append mode, if target layer has a FID creation option, reuse source FID name and source FIDs, unless -unsetFid is specified (#5845)"

comment:5 Changed 7 years ago by Even Rouault

Resolution: fixed
Status: newclosed

comment:6 Changed 7 years ago by Even Rouault

trunk r28527 "PG: remove bCopyStatementWithFID recently introduced and that was a duplicate of bFIDColumnInCopyFields (#5845)"

comment:7 Changed 6 years ago by Even Rouault

Milestone: 2.02.0.0

Milestone renamed

Note: See TracTickets for help on using tickets.