Bug report #10102

Cannot add varchar2 and char attributes in Oracle layers

Added by Médéric RIBREUX over 6 years ago. Updated over 6 years ago.

Status:Closed
Priority:Normal
Assignee:Jürgen Fischer
Category:Data Provider/Oracle
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

Description

Hello,

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

or

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...

Associated revisions

Revision 9414717b
Added by Jürgen Fischer over 6 years ago

oracle provider: reload fields after adding or deleting attributes (fixes #10102)

History

#1 Updated by Jürgen Fischer over 6 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF