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 support VARCHAR(), INT, DOUBLE PRECISION and DATE. 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