g.column.pg
NAME
g.column.pg - Generate a list of database columns for a specified table in the currently selected database. (GRASS-RDBMS General Interface Program)
SYNOPSIS
g.column.pg
g.column.pg help
g.column.pg [-v] table=name
DESCRIPTION
g.column.pg is used to generate a list of the columns in the specified table [table] of the currenty selected database. If the [-v] option is used the data type and length of the column are reported as well. The currently selected database is identified by the GRASS environment variable $PGDBASE which is set using the g.select.pg GRASS-RDBMS interface tool. If this environment variable is not set the program terminates with a message to the user. To generate a list of the available tables in the currently selected database use the command g.table.pg. The information provided by g.column.pg will be used in subsequent GRASS-RDBMS applications to formulate and construct well formed database queries.
COMMAND LINE OPTIONS
Flag:
- -v
- Use v for a verbose listing of columns
Parameter:
- table=databasetablename
- Name of table in the currently selected database.
EXAMPLE OUTPUT (terse)
g.column.pg table=nri
The following columns are defined in table: utm
fips flood hydunit
landcl82 landcl87 mlra
nriptr other point
psu refname slope
soil5 textmod texture
tfact ukfact utme
utmn xfact
EXAMPLE OUTPUT (verbose)
g.column.pg table=nri -v
The following columns are defined in table: utm
flood char16
hydunit char16
landcl82 char
landcl87 char
mlra char16
nriptr int4
other text
BUGS
None known.
NOTE
This program requires the Informix database software.
SEE ALSO
g.select.pg, g.stats.pg, g.table.pg, d.rast.pg, d.site.pg, d.vect.pg, d.what.r.pg, d.what.s.pg, d.what.v.pg, r.reclass.pg, r.rescale.pg, v.reclass.pg
AUTHOR
Original Informix SQL-tools: James A. Farley, Wang Song, and W. Fredrick Limp University of Arkansas, CAST
Postgres modifications: Janne Soimasuo, Faculty of Forestry, University of Joensuu, Finland.
Updated to GRASS 5 by Alex Shevlakov (sixote@yahoo.com)