[GRASS-SVN] r53172 - grass/branches/develbranch_6/db/drivers/postgres
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Sep 12 06:23:47 PDT 2012
Author: neteler
Date: 2012-09-12 06:23:46 -0700 (Wed, 12 Sep 2012)
New Revision: 53172
Modified:
grass/branches/develbranch_6/db/drivers/postgres/grass-pg.html
Log:
backport of r53166 and r53170
Modified: grass/branches/develbranch_6/db/drivers/postgres/grass-pg.html
===================================================================
--- grass/branches/develbranch_6/db/drivers/postgres/grass-pg.html 2012-09-12 13:22:50 UTC (rev 53171)
+++ grass/branches/develbranch_6/db/drivers/postgres/grass-pg.html 2012-09-12 13:23:46 UTC (rev 53172)
@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
-<title>GRASS-PostgreSQL driver</title>
+<title>GRASS-PostgreSQL DB driver</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="grassdocs.css" type="text/css">
</head>
@@ -11,14 +11,15 @@
<img src="grass_logo.png" alt="GRASS logo"><hr align=center size=6 noshade>
<!-- meta page description: PostgreSQL driver -->
-<h1>PostgreSQL driver in GRASS</h1>
+<h1>PostgreSQL DB driver in GRASS</h1>
-The driver name in GRASS is 'pg'.
+The DB (database) driver name in GRASS is <b>pg</b>.
<h2>Creating a PostgreSQL database</h2>
-A new database is created with 'createdb', see the PostgreSQL manual
-for details.
+A new database is created with <tt>createdb</tt>, see
+the <a href="http://www.postgresql.org/docs/manuals/">PostgreSQL
+manual</a> for details.
<h2>Connecting GRASS to PostgreSQL</h2>
@@ -49,12 +50,10 @@
be generated as follows in a PostgreSQL table:
<div class="code"><pre>
-echo "
- ALTER TABLE mytable ADD ID integer;
- CREATE SEQUENCE mytable_seq;
- UPDATE mytabe SET ID = nextval('mytable_seq');
- DROP SEQUENCE mytable_seq;
-" | db.execute
+db.execute sql="ALTER TABLE mytable ADD ID integer"
+db.execute sql="CREATE SEQUENCE mytable_seq"
+db.execute sql="UPDATE mytable SET ID = nextval('mytable_seq')"
+db.execute sql="DROP SEQUENCE mytable_seq"
</pre></div>
@@ -68,8 +67,9 @@
<h2>Geometry import from PostgreSQL table into GRASS</h2>
-<em>v.in.db</em> creates a new vector (points) map from a database table
-containing coordinates. See <a href="v.in.db.html">here</a> for examples.
+<em><a href="v.in.db.html">v.in.db</a></em> creates a new vector
+(points) map from a database table containing
+coordinates. See <a href="v.in.db.html">here</a> for examples.
<h2>PostGIS: PostgreSQL with vector geometry</h2>
More information about the grass-commit
mailing list