Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't import a file with a field called fid #152

Open
robe2 opened this issue May 15, 2018 · 2 comments
Open

Can't import a file with a field called fid #152

robe2 opened this issue May 15, 2018 · 2 comments

Comments

@robe2
Copy link
Contributor

robe2 commented May 15, 2018

I assume this is the case for all files, but I tried reimporting an excel spreadsheet I had exported from an imported table and was greeted with this message:

IMPORT FOREIGN SCHEMA ogr_all FROM SERVER svr_dues INTO staging;

column "fid" specified more than once

Thinking maybe if there is an existing we should rename it rather than just erroring out.

@robe2
Copy link
Contributor Author

robe2 commented Jan 31, 2021

Ran into this again when trying to load up this shapefile - https://opendata.arcgis.com/datasets/956e52eb7abb4787abd7386e8efd600b_0.zip?outSR=%7B%22latestWkid%22%3A3857%2C%22wkid%22%3A102100%7D

Linked from - https://bmore-open-data-baltimore.hub.arcgis.com/datasets/police-districts-5

I wonder if they use GDAL to export to shapefile :)

@df7cb
Copy link
Contributor

df7cb commented Jun 25, 2021

This seems to break the regression tests for 1.1.1 with PG14:

10:58:38 **** regression.diffs ****
10:58:38 diff -U3 /tmp/autopkgtest.hS6MBA/tree/expected/pgsql.out /tmp/autopkgtest.hS6MBA/tree/results/pgsql.out
10:58:38 --- /tmp/autopkgtest.hS6MBA/tree/expected/pgsql.out	2021-06-25 08:58:37.138682292 +0000
10:58:38 +++ /tmp/autopkgtest.hS6MBA/tree/results/pgsql.out	2021-06-25 08:58:38.086673109 +0000
10:58:38 @@ -179,6 +179,7 @@
10:58:38  DELETE FROM bytea_fdw 
10:58:38    WHERE fid = 4;
10:58:38  DEBUG:  OGR SQL: (fid = 4)
10:58:38 +ERROR:  cannot find 'fid' column in table 'bytea_fdw'
10:58:38    
10:58:38  SELECT a.fid, a.name, b.name 
10:58:38    FROM bytea_local a 
10:58:38 @@ -189,6 +190,7 @@
10:58:38     1 | Jim    | Jim
10:58:38     2 | Marvin | Marvin
10:58:38     3 |        | 
10:58:38 -(3 rows)
10:58:38 +   4 | Maggie | Maggie
10:58:38 +(4 rows)
10:58:38  

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants