v.db.addcolumn(1)
β¨ v.db.addcolumn β¨
okay bestie, welcome to the GRASS GIS User's Manual π this is the page for v.db.addcolumn(1) and it is genuinely one of the most useful little gremlins in the whole vector toolkit, no cap.
πΈ NAME πΈ
v.db.addcolumn β adds one or more columns to the attribute table connected to a given vector map. that's it, that's the whole job, and it does it flawlessly π
π 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, aka the little cheat sheet π«Ά--verboseβ verbose module output, it tells you everything it's doing--quietβ quiet module output, it tells you nothing, silent queen energy--uiβ force launching GUI dialog, for when you want buttons instead of typing
π 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). here's the tea: 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:1columns=name type[,name type,...][required] β name and type of the new column(s), written like'name type [,name type, ...]'. the types depend on your database backend, but all of them should 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. and the way it just automatically checks the connection for the specified layer? obsessed. it's giving responsible main character energy πβ¨
π NOTES π
v.db.addcolumn is a front-end to db.execute to allow easier usage. so like, it's the cute approachable face of a slightly scarier command, and honestly? we love a glow-up π
the supported types of columns depend on the database backend. however, all backends should support VARCHAR, INT, DOUBLE PRECISION and DATE.
the existing database connection(s) can be verified with v.db.connect. do that. fr fr. π«Ά
π₯ 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
like, look at that. two columns. one line. ate. π
π 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)
accessed: Saturday Jan 17 05:41:52 2026
Main index | Vector index | Topics index | Keywords index | Graphical index | Full index
Β© 2003-2025 GRASS Development Team, GRASS GIS 8.4.2 Reference Manual
and that's the whole page bestie, every flag, every default, every type, every index link, nothing skipped, we keep the facts and serve the vibe π
okay bye ily, this was GRASS 8.4.2 β v.db.addcolumn(1) β go add some columns and slay β¨ππ
π¦ where this page comes from
- fedora 44: grass 8.4.2-4.fc44 Β· 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