Bug report #16172
DB-Manager: new GeoPackage tables display wrong values
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | |||
Category: | DB Manager | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | GNU/Linux | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | invalid |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 24082 |
Description
Here's how to reproduce the problem:
1. Open DB-Manager, create a connection with a GeoPackage
2. Create a new table with the SQL command CREATE TABLE foo AS SELECT * FROM bar
3. Re-connect the GeoPackage to see the new table (using refresh doesn't work)
4. Select the new table in DB-Manager and click on the "Table" tab
Wrong values are displayed... However if you add the table to the canvas and open the attribute table, then the correct values will be shown.
History
#1
Updated by Giovanni Manghi over 7 years ago
- Easy fix? set to No
- Regression? set to No
#2
Updated by gcarrillo - almost 7 years ago
- File ogrinfo.png added
- Description updated (diff)
- File qgis_2_99.png added
- File qgis_2_14_12.png added
I can confirm this issue running on QGIS 2.99 (68909a1).
Showing a table from GeoPackage database works fine in QGIS 2.14.12 (DB Manager) and from ogrinfo. DB Manager in QGIS v2.99 (68909a1) cannot show values properly, and shifts them one column to the left, apparently to make space for an auto-increment field.
QGIS 2.14.12:
QGIS 2.99 (68909a1):
Output of ogrinfo:
#3
Updated by gcarrillo - almost 7 years ago
- Operating System set to GNU/Linux
- Affected QGIS version changed from 2.18.3 to master
#4
Updated by Even Rouault almost 7 years ago
- Status changed from Open to Closed
- Resolution set to invalid
I cannot reproduce with master. And actualy this way of creating tables is not supported in GeoPackage with recent GDAL version since non-spatial tables ("attributes" in geopackage parlance) must also be registered in the gpkg_contents system table, otherwise they will be invisible as soon as a properly registered "attributes" table is created