Feature request #1630

v.db.addcol: checkbox for data type

Added by Paolo Cavallini almost 8 years ago. Updated over 4 years ago.

Status:Open Start Date:
Priority:Low Due date:
Assigned to:nobody - % Done:


Target version:Future Release - Nice to have
Platform:All Resolution:
Platform version: Pull Request or Patch supplied:
Status info:0 Tag:


In current v.db.addcol, the user has to insert the type (integer, double precision, varchar) of the column by hand. Please replace this with a checkbox


Updated by Redmine Admin almost 8 years ago

Did you consider that each database supports different types? So either we limit the options to VARCHAR, INT, DOUBLE PRECISION/REAL and DATE or we add more types but user can end up with error even if the type was offered in the list.

The best solution would be to add a function to all GRASS db drivers to return list of supported types and write an interface in qgis which will use those lists according to selected vector/layer (i.e. db). But that seems to be overkill to me at this moment.


Updated by Paolo Cavallini almost 8 years ago

Agreed. I did not consider this. Perhaps this could be added ad a comment in the interface?
Something like: "For PostgreSQL: varchar etc. For DBF:..."

Updated by Redmine Admin almost 8 years ago

Ok, GRASS modules support descriptions for each possible value, so we can show in combobox something like:
int (All drivers)
varchar (All drivers)
datetime (Postgres, MySQL, Sqlite)

But that is not very user friendly I think. My original idea with GRASS plugin was to add only the modules which are supported well in GUI.

We forgot also that various types can have additional parameters, e.g. NUMERIC, varchar(n), so it becomes realy messy because (with simple interface based on module description) we have to add also 2 numeric input options which usually becomes empty.

Please read olso my comments for #1631. I realy suggest to 'Add column' as QGIS new feature supported by all drivers.


Updated by Paolo Cavallini about 7 years ago

Please note: in GRASS wx interface the problem is the same

Updated by Giovanni Manghi over 5 years ago

  • Target version changed from Version 1.7.0 to Version 1.7.4

Updated by Giovanni Manghi almost 5 years ago

  • Target version changed from Version 1.7.4 to Version 2.0.0

Updated by Pirmin Kalberer over 4 years ago

  • Target version changed from Version 2.0.0 to Future Release - Nice to have

Also available in: Atom