mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
Don't assume pg_attribute.attgenerated will always have "s"
The value for pg_attribute.attgenerated will hold "s" for stored generated fields, but this might change in future releases of PostgreSQL. So, we just check for the presence of a value in that field.
This commit is contained in:
parent
5347759889
commit
fe3a8b1565
@ -920,7 +920,7 @@ bool QgsPostgresProvider::loadFields()
|
||||
notNullMap[attrelid][attnum] = attNotNull;
|
||||
uniqueMap[attrelid][attnum] = uniqueConstraint;
|
||||
identityMap[attrelid][attnum] = attIdentity.isEmpty() ? " " : attIdentity;
|
||||
generatedMap[attrelid][attnum] = attGenerated == "s" ? defVal : "";
|
||||
generatedMap[attrelid][attnum] = attGenerated.isEmpty() ? "" : defVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user