Bug report #20067
Duplicate feature action fails with PostgreSQL error message
|Affected QGIS version:||3.3(master)||Regression?:||Yes|
|Operating System:||any||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||27889|
The Duplicate feature action that is available from the Actions menu of a feature form is currently broken in QGIS 3.2 and QGIS master. It still work fine in QGIS 3.0.x
The issues might be specific to my project and data structure.
The affected column that causes issues also has a default value attached, that is created by a custom Python expression.
In version 3.2.x nothing happens when trying to digitize the duplicate, in 3.3x there is the following error message:
CRITICAL: Layer EWS_Anlage: PostGIS-Fehler beim Attributhinzufügen: ERROR: value too long for type character varying(7).
However, the values that are generated by the custom python expression function are exactly 7 characters long.
Could it be that in 3.2 and master it is trying to commit the expression code instead of the expression result for default values?
David should have our project file and DB structure, but I can submit it to others on request.
#3 Updated by David Signer almost 2 years ago
I've been able to reproduce.
get_ews_anlage_gemeinde_formatted() || '.' || get_ews_anlage_nr( get_ews_anlage_gemeinde_formatted() )
is displayed as invalid on my build. Not sure how it is on the 3.0.x - can you check?
Has there been a change in the call of the functions like e.g. with an