Bug report #10102
Cannot add varchar2 and char attributes in Oracle layers
|Affected QGIS version:||2.2.0||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||18570|
In QGis 2.2, it is impossible to add varchar2 or char attributes on an Oracle layer. When I try to do it, the query passed to the Oracle Spatial server lacks the width of the field.
For example, I've got those SQL queries when I try to add varchar2 or char layers:
ALTER TABLE "MMET"."TEST_QGIS_S" ADD "QGIS_ATTR" VARCHAR2
ALTER TABLE "MMET"."TEST_QGIS_S" ADD "QGIS_ATTR" CHAR
In the code, I think that the returned type variable is in uppercase characters (VARCHAR2 and CHAR) and the test is against lowercase strings.
I 've tried to do it on numbers fields (which also have a width attribute) and it works very well...