4

I'm working in a PostgreSQL table (PostGIS) that I loaded into QGIS. This layer has been created by a SQL Statement in pgAdmin.

I noticed that the order of attributes shown in the attribute table differs from that I declared with the SQL Statement. But checking the layer properties in QGIS (tab "fields"), the order is correct.

To make it more weird, I tested it with QGIS 2.14, 2.18 and 3.6 and the wrong order in the attribute table doesn't occur in 2.14, but in the others.

Does anyone have an idea why order changes?

Vince
  • 20,017
  • 15
  • 45
  • 64
Maja Ott
  • 435
  • 4
  • 16

1 Answers1

2

I finally found out why all this. It was because of an old style that was saved in the database and that referred to an older Version of the layer, where some attributes where missing before. In the new Version of the layer all new attributes where added at the end. Overwriting the style using QGIS 2.14 solved the problem.

Maja Ott
  • 435
  • 4
  • 16