Feature request #1630
v.db.addcol: checkbox for data type
|Pull Request or Patch supplied:||No||Resolution:|
|Easy fix?:||No||Copied to github as #:||11690|
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
#1 Updated by Redmine Admin about 10 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.
#3 Updated by Redmine Admin about 10 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.