v.db.addcolumn(1grass)
π v.db.addcolumn β the GRASS manual, bestie edition π
okay so you're reading the v.db.addcolumn page from the GRASS User's Manual (that's the 1grass manual, iykyk) and honestly? it's giving "small tool, big slay". let's get into it π
β¨ NAME β¨
v.db.addcolumn β adds one or more columns to the attribute table connected to a given vector map. periodt, that's the whole job π
π¦ KEYWORDS π¦
vector, attribute table, database
πΈ SYNOPSIS πΈ
v.db.addcolumn
v.db.addcolumn --help
v.db.addcolumn map=name [layer=string] columns=name type[,name type,...] [--help] [--verbose] [--quiet] [--ui]
π Flags
--helpβ print usage summary. your emotional support help text π--verboseβ verbose module output. it says the quiet part out loud β¨--quietβ quiet module output. not a peep π€«--uiβ force launching GUI dialog. for when you want the pretty buttons π
π§ Parameters
map=name[required]β name of vector map. or, plot twist, the data source for direct OGR access πlayer=stringβ layer number where to add column(s). vector features can have category values in different layers, and this number determines which layer to use. when used with direct OGR access, this is the layer name instead. Default:1πcolumns=name type[,name type,...][required]β name and type of the new column(s), written as'name type [,name type, ...]'. the types you can use depend on the database backend, but literally all of them supportVARCHAR(),INT,DOUBLE PRECISIONandDATE. example:'label varchar(250), value integer'β
π DESCRIPTION π
v.db.addcolumn adds one or more column(s) to the attribute table connected to a given vector map. the way that it automatically checks the connection for the specified layer?? obsessed, honestly. it just does it for you, no notes π«Ά
π₯ NOTES π₯
v.db.addcolumn is a front-end to db.execute so that using it is way easier β bestie behavior fr fr. the types of columns it supports depend on the database backend, but all backends should support VARCHAR, INT, DOUBLE PRECISION and DATE.
if you wanna double-check the existing database connection(s), that's what v.db.connect is for β¨
π EXAMPLES π
adding a single column:
g.copy vect=roadsmajor,myroads
v.db.addcolumn myroads columns="slope double precision"
v.info -c myroads
adding two columns:
g.copy vect=roadsmajor,myroads
v.db.addcolumn myroads columns="slope double precision,myname varchar(15)"
v.info -c myroads
π SEE ALSO π
db.connect, db.execute, v.db.addtable, v.db.connect, v.db.dropcolumn, v.db.droptable, v.db.select, v.db.update
GRASS SQL interface
π AUTHOR π
Moritz Lennert (mlennert@club.worldonline.be)
β SOURCE CODE β
Available at: v.db.addcolumn source code (history)
Latest change: Thursday Nov 06 22:27:54 2025 in commit: 298b38614712934179355ea767403d6bfea8f5f9
Main index | Vector index | Topics index | Keywords index | Graphical index | Full index
π no cap: that commit hash is 298b38614712934179355ea767403d6bfea8f5f9, Thursday Nov 06 22:27:54 2025, and it's your "latest change". screenshot it, cite it, keep it exact π«Ά
and that's the whole page, bestie!! Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual β shoutout to the GRASS 8.5.0 era, main character energy only ππ
β¨
π¦ where this page comes from
- alpine 3.24: grass-gis-doc 8.5.0-r1 Β· GPL-2.0-or-later
- ubuntu stonking: grass-doc 8.5.0-1ubuntu1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms