-
Notifications
You must be signed in to change notification settings - Fork 33
Description
If this isn't possible, then ogr_fdw should at least throw an error telling you that.
Here is my situation. I have this SQLite database with primary keys and GDAL has this less than useful feature of renaming my primary keys in the database to fid.
This would be all fine if I could rename them back to the name they originally were.
I can rename other fields, but for some reason, when I try to rename the fid column, I just get NULLs in the fields back. I also tried using the original name and that didn't work either. I even made sure the casing was the same.
Here is an example -First tried this
CREATE FOREIGN TABLE testentry
(testid bigint OPTIONS (column_name 'fid'),
testsheetid integer ,
equipid integer ,
testtypeid integer ,
alarm integer ,
comment character varying )
SERVER fds_test_data
OPTIONS (layer 'testentry');
Then I tried this:
CREATE FOREIGN TABLE testentry
(testid bigint OPTIONS (column_name 'testid'),
testsheetid integer ,
equipid integer ,
testtypeid integer ,
alarm integer ,
comment character varying )
SERVER fds_test_data
OPTIONS (layer 'testentry');
I tried with ESRI shape files as well and that didn't work either, though in case of ESRI shape the FID is a made-up field anyway.
I have the same issue with MSSpatial which is why I always use the ODBC driver when I only care about the non-relational part. ODBC seems conveniently stupid enough not to notice I have primary keys that it can rename to fid.