Feature request #19815
Default primary key identification posts
| Status: | Open | ||
|---|---|---|---|
| Priority: | Normal | ||
| Assignee: | - | ||
| Category: | Data Provider/PostGIS | ||
| Pull Request or Patch supplied: | No | Resolution: | |
| Easy fix?: | No | Copied to github as #: | 27639 |
Description
I often use a lot of dynamic views with variable data. As such, when I go to add a postgis table through data sources it will not deduce what the primary key is for any view, event though the underlying table has a primary key. I then have to select it and choose the primary key. What if we had a default name specifically for QGIS; such as, qgis_id.
If it sees qgis_id then it would automatically choose that as the primary key.
My views in postgis could then be created such as:
create view test_data as
select a.primary_id as qgis_id, a.num, b.etc from table1 a, table2 b where a.num = b.num