Thanks for the link, Moritz

Remember to have read about ongoing changes, but couldn't find the correct schema-import in the manual of 7.2.0. Syntax is already layer="schema.table" in grass72.0 and apparently has been different in the past.



On 09.08.2017 16:32, Moritz Lennert wrote:
On 09/08/17 16:13, patrick s. wrote:
Dear all

A short not on the manual 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.

This has been fixed a few months ago both in trunk and in the 7.2 release branch, so the new 7.2.2 release that is due pretty soon (end of the month) should have the fix included. However, the man pages have not been updated AFAICS.

You can read the thread starting at [1] for some discussion on the issue. The important issue is that db.connect should not be used for data import as this sets the database connection for all attribute tables of vector maps to be created, included of the one imported...

So you should be able to do everything with a single call, without db.connect/db.login.



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 input="$INPATH" layer="mytablename" out=mygrasstablename type="point" -r

#Working code in version GRASS72:


db.connect driver=pg database=mydatabase #no schema required, as it has to be called inside 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" input=PG: layer=river output=river table=user1.river

grass-user mailing list

grass-user mailing list

Reply via email to