Feature request #1630

v.db.addcol: checkbox for data type

Added by Paolo Cavallini almost 15 years ago. Updated about 6 years ago.

Status:Open
Priority:Low
Assignee:-
Category:GRASS
Pull Request or Patch supplied:No Resolution:
Easy fix?:No Copied to github as #:11690

Description

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

History

#1 Updated by Redmine Admin almost 15 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.

Radim

#2 Updated by Paolo Cavallini almost 15 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:..."

#3 Updated by Redmine Admin almost 15 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)
etc.

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.

Radim

#4 Updated by Paolo Cavallini almost 14 years ago

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

#5 Updated by Giovanni Manghi over 12 years ago

  • Target version changed from Version 1.7.0 to Version 1.7.4

#6 Updated by Giovanni Manghi almost 12 years ago

  • Target version changed from Version 1.7.4 to Version 2.0.0

#7 Updated by Pirmin Kalberer over 11 years ago

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

#8 Updated by Giovanni Manghi almost 7 years ago

  • Pull Request or Patch supplied set to No
  • Easy fix? set to No

#9 Updated by Paolo Cavallini about 6 years ago

  • Assignee deleted (nobody -)

Still true in QGIS 3

Also available in: Atom PDF