[GRASS-user] Syntax v.in.ogr for schema-support PostGIS
patrick s.
patrick_gis at gmx.net
Wed Aug 9 07:13:29 PDT 2017
Dear all
A short not on the manual v.in.ogr. It appears to be out of date for
PostGIS import. I have to call the schema in "layer" to have
schema-support. My previous code as given below was been running without
this.
Best Regards,
patrick schirmer
#Syntax in the past and still recommended according to manual:
INPATH="PG:dbname=mydatabase schema=myschema"
db.connect driver=pg database=mydatabase schema=myschema #eventially
unnecessary
v.in.ogr input="$INPATH" layer="mytablename" out=mygrasstablename
type="point" -r
#Working code in version GRASS72:
INPATH="PG:dbname=$DB_NAME"
db.connect driver=pg database=mydatabase #no schema required, as it has
to be called inside v.in.ogr
v.in.ogr input="$INPATH" layer="myschema.mytablename"
out=mygrasstablename type="point" -r
#extract of manual:
db.connect driver=pg database=test schema=user1
db.login user=user1 password=pwd1
# -> input="PG:dbname=test user=user1 password=pwd1" layer="user1.river"
v.in.ogr input=PG: layer=river output=river
db.select table=user1.river
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20170809/9c317c6a/attachment.html>
More information about the grass-user
mailing list