1

I tried to import a building-shapefile (ax_gebaeude) into the postgis database (Postgresql 11). I normally use Qgis 3.12 with drag & drop for that. In this case I get an error message:

Failed to import some layers!

Creation of fields failed

The layer can be openend by QGis or ArcGisPro without any problems. I also tried to use the tool fixe geometries before. I renamend all columns in small letters. I tried to export the file via ArcGis, to get rid of the problems but the problem remains. Any ideas? The field names are: enter image description here enter image description here

2
  • What are the field names? – HeikkiVesanto Feb 16 at 10:58
  • I added the fieldnames – oppia04 Feb 16 at 11:23
2

For PostgreSQL there are some system columns that are reserved and cannot be used. But there should be a better error message, as per the bug report:

https://github.com/qgis/QGIS/issues/26246

But you cannot have columns with these names:

tableoid
xmin
cmin
xmax
cmax
ctid

https://www.postgresql.org/docs/12/ddl-system-columns.html

So for your table. xmin and xmax should be changed to x_min x_max for example.

1
  • 1
    perfect solution thxs – oppia04 Feb 16 at 13:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.