RE: [gdal-dev] Copying FIDs into existing PG schema

2012-02-07 Thread Jeremy Palmer
a.m. > To: gdal-dev@lists.osgeo.org > Cc: Jeremy Palmer > Subject: Re: [gdal-dev] Copying FIDs into existing PG schema > > > Is there a specific reason for the OGRPGTableLayer::BuildCopyFields (and > > CreateFeatureViaCopy) checking that the field must exist in the layer >

Re: [gdal-dev] Copying FIDs into existing PG schema

2012-02-07 Thread Even Rouault
> Is there a specific reason for the OGRPGTableLayer::BuildCopyFields (and > CreateFeatureViaCopy) checking that the field must exist in the layer > FieldDefn before adding it to the copy field list? Or is this a bug? Jeremy, I've created http://trac.osgeo.org/gdal/ticket/4495 to capture the issu

[gdal-dev] Copying FIDs into existing PG schema

2012-02-06 Thread Jeremy Palmer
Hi When using the config PG_USE_COPY option the copy command does not include the destination FID in the field list. In my case the destination FID field is a primary key with a not null constraint, so the copy fails. e.g. ogr2ogr --config PG_USE_COPY TRUE -append -preserve_fid -f "PostgreSQL"