[GRASS-user] Reconnecting vector attribution with Postgres/PostGIS

Hi Grass 7 users.

I am trying to connect some vector layers with thier respective attribute tables in postgres/postgis. The tables all connected under version 6.4.4 but not since upgrading to version 7RC1 (on winxp in this instance) they do not. It looks like Grass cannot find the database password but it is present in ‘db.login’. Has anyone else had this happen? Here are the outputs:-

Grass Command Prompt

Cleaning up temporary files…

Starting GRASS GIS…

ERROR: Location not found

WARNING: Concurrent mapset locking is not supported on Windows


/ ____/ __ / | / ___/ ___/ / ____/ _/ ___/

/ / / // / /| | _ \ \ / / __ / / _ \

/ // / , / ___ |/ /__/ / / /_/ // / ___/ /

_// |// |/// _///___/

Welcome to GRASS 7.0.0RC1

GRASS homepage: http://grass.osgeo.org

This version running through: Command Shell (C:\WINDOWS\system32\cmd.

exe)

Help is available with the command: g.manual -i

See the licence terms with: g.version -c

If required, restart the GUI with: g.gui wxpython

When ready to quit enter: exit

Launching GUI in the background, please wait…

Microsoft Windows XP [Version 5.1.2600]

(C) Copyright 1985-2001 Microsoft Corp.

H:>DBMI-PostgreSQL driver error:

Unknown option in database definition for PostgreSQL: dbname=postgis

DBMI-PostgreSQL driver error:

Unknown option in database definition for PostgreSQL: dbname=postgis

GRASS_INFO_WARNING(2500,1): Unable to open database <host=gisdb.neath-porttalbot

.gov.uk, dbname=postgis> by driver

GRASS_INFO_END(2500,1)

GRASS_INFO_WARNING(2500,2): Unable open database <host=gisdb.neath-porttalbot.go

v.uk, dbname=postgis> by driver

GRASS_INFO_END(2500,2)

DBMI-PostgreSQL driver error:

Unknown option in database definition for PostgreSQL: dbname=postgis

DBMI-PostgreSQL driver error:

Unknown option in database definition for PostgreSQL: dbname=postgis

GRASS_INFO_ERROR(2500,3): Unable to open database <host=gisdb.neath-porttalbot.g

ov.uk, dbname=postgis>

GRASS_INFO_END(2500,3)

DBMI-PostgreSQL driver error:

Unknown option in database definition for PostgreSQL: dbname=postgis

DBMI-PostgreSQL driver error:

Unknown option in database definition for PostgreSQL: dbname=postgis

GRASS_INFO_WARNING(4928,1): Unable to open database <host=gisdb.neath-porttalbot

.gov.uk, dbname=postgis> by driver

GRASS_INFO_END(4928,1)

GRASS_INFO_WARNING(4928,2): Unable open database <host=gisdb.neath-porttalbot.go

v.uk, dbname=postgis> by driver

GRASS_INFO_END(4928,2)

DBMI-PostgreSQL driver error:

Unknown option in database definition for PostgreSQL: dbname=postgis

DBMI-PostgreSQL driver error:

Unknown option in database definition for PostgreSQL: dbname=postgis

GRASS_INFO_ERROR(4928,3): Unable to open database <host=gisdb.neath-porttalbot.g

ov.uk, dbname=postgis>

GRASS_INFO_END(4928,3)

DBMI-PostgreSQL driver error:

Unknown option in database definition for PostgreSQL: dbname=postgis

DBMI-PostgreSQL driver error:

Unknown option in database definition for PostgreSQL: dbname=postgis

GRASS_INFO_WARNING(3988,1): Unable to open database <host=gisdb.neath-porttalbot

.gov.uk, dbname=postgis> by driver

GRASS_INFO_END(3988,1)

GRASS_INFO_WARNING(3988,2): Unable open database <host=gisdb.neath-porttalbot.go

v.uk, dbname=postgis> by driver

GRASS_INFO_END(3988,2)

DBMI-PostgreSQL driver error:

Unknown option in database definition for PostgreSQL: dbname=postgis

DBMI-PostgreSQL driver error:

Unknown option in database definition for PostgreSQL: dbname=postgis

GRASS_INFO_ERROR(3988,3): Unable to open database <host=gisdb.neath-porttalbot.g

ov.uk, dbname=postgis>

GRASS_INFO_END(3988,3)

DBMI-PostgreSQL driver error:

Unknown option in database definition for PostgreSQL: dbname=postgis

DBMI-PostgreSQL driver error:

Unknown option in database definition for PostgreSQL: dbname=postgis

GRASS_INFO_WARNING(4156,1): Unable to open database <host=gisdb.neath-porttalbot

.gov.uk, dbname=postgis> by driver

GRASS_INFO_END(4156,1)

GRASS_INFO_WARNING(4156,2): Unable open database <host=gisdb.neath-porttalbot.go

v.uk, dbname=postgis> by driver

GRASS_INFO_END(4156,2)

DBMI-PostgreSQL driver error:

Unknown option in database definition for PostgreSQL: dbname=postgis

DBMI-PostgreSQL driver error:

Unknown option in database definition for PostgreSQL: dbname=postgis

GRASS_INFO_ERROR(4156,3): Unable to open database <host=gisdb.neath-porttalbot.g

ov.uk, dbname=postgis>

GRASS_INFO_END(4156,3)

DBMI-PostgreSQL driver error:

Unknown option in database definition for PostgreSQL: dbname=postgis

DBMI-PostgreSQL driver error:

Unknown option in database definition for PostgreSQL: dbname=postgis

GRASS_INFO_WARNING(4520,1): Unable to open database <host=gisdb.neath-porttalbot

.gov.uk, dbname=postgis> by driver

GRASS_INFO_END(4520,1)

GRASS_INFO_WARNING(4520,2): Unable open database <host=gisdb.neath-porttalbot.go

v.uk, dbname=postgis> by driver

GRASS_INFO_END(4520,2)

DBMI-PostgreSQL driver error:

Unknown option in database definition for PostgreSQL: dbname=postgis

DBMI-PostgreSQL driver error:

Unknown option in database definition for PostgreSQL: dbname=postgis

GRASS_INFO_ERROR(4520,3): Unable to open database <host=gisdb.neath-porttalbot.g

ov.uk, dbname=postgis>

GRASS_INFO_END(4520,3)

DBMI-PostgreSQL driver error:

Unknown option in database definition for PostgreSQL: dbname=postgis

DBMI-PostgreSQL driver error:

Unknown option in database definition for PostgreSQL: dbname=postgis

GRASS_INFO_WARNING(5048,1): Unable to open database <host=gisdb.neath-porttalbot

.gov.uk, dbname=postgis> by driver

GRASS_INFO_END(5048,1)

GRASS_INFO_WARNING(5048,2): Unable open database <host=gisdb.neath-porttalbot.go

v.uk, dbname=postgis> by driver

GRASS_INFO_END(5048,2)

DBMI-PostgreSQL driver error:

Unknown option in database definition for PostgreSQL: dbname=postgis

DBMI-PostgreSQL driver error:

Unknown option in database definition for PostgreSQL: dbname=postgis

GRASS_INFO_ERROR(5048,3): Unable to open database <host=gisdb.neath-porttalbot.g

ov.uk, dbname=postgis>

GRASS_INFO_END(5048,3)

DBMI-PostgreSQL driver error:

Unknown option in database definition for PostgreSQL: dbname=postgis

DBMI-PostgreSQL driver error:

Unknown option in database definition for PostgreSQL: dbname=postgis

GRASS_INFO_WARNING(5884,1): Unable to open database <host=gisdb.neath-porttalbot

.gov.uk, dbname=postgis> by driver

GRASS_INFO_END(5884,1)

GRASS_INFO_WARNING(5884,2): Unable open database <host=gisdb.neath-porttalbot.go

v.uk, dbname=postgis> by driver

GRASS_INFO_END(5884,2)

DBMI-PostgreSQL driver error:

Unknown option in database definition for PostgreSQL: dbname=postgis

DBMI-PostgreSQL driver error:

Unknown option in database definition for PostgreSQL: dbname=postgis

GRASS_INFO_ERROR(5884,3): Unable to open database <host=gisdb.neath-porttalbot.g

ov.uk, dbname=postgis>

GRASS_INFO_END(5884,3)

···

Paul J. Shapley MSc CGeog (GIS) FRGS

On 02/02/15 13:37, Paul Shapley wrote:

Hi Grass 7 users.

I am trying to connect some vector layers with thier respective
attribute tables in postgres/postgis. The tables all connected under
version 6.4.4 but not since upgrading to version 7RC1 (on winxp in this
instance) they do not. It looks like Grass cannot find the database
password but it is present in 'db.login'. Has anyone else had this
happen? Here are the outputs:-

Apparently there was a change in the db driver that has the effect of not allowing whitespace between the different connection parameters.

GRASS64:

db.connect driver=pg database="dbname=nc_grass,host=localhost" db.tables -p
=> OK

db.connect driver=pg database="dbname=nc_grass, host=localhost"
db.tables -p
=> OK

trunk (7.1):

db.connect driver=pg database="dbname=nc_grass,host=localhost"
db.tables -p
=> OK

db.connect driver=pg database="dbname=nc_grass, host=localhost"
db.tables -p
=>Error

I don't know if this was intended. Please file a bug report.

Moritz

On Mon, Feb 2, 2015 at 1:57 PM, Moritz Lennert
<mlennert@club.worldonline.be> wrote:

On 02/02/15 13:37, Paul Shapley wrote:

Hi Grass 7 users.

I am trying to connect some vector layers with thier respective
attribute tables in postgres/postgis. The tables all connected under
version 6.4.4 but not since upgrading to version 7RC1 (on winxp in this
instance) they do not. It looks like Grass cannot find the database
password but it is present in 'db.login'. Has anyone else had this
happen? Here are the outputs:-

Apparently there was a change in the db driver that has the effect of not
allowing whitespace between the different connection parameters.

GRASS64:

db.connect driver=pg database="dbname=nc_grass,host=localhost" db.tables -p
=> OK

db.connect driver=pg database="dbname=nc_grass, host=localhost"
db.tables -p
=> OK

trunk (7.1):

db.connect driver=pg database="dbname=nc_grass,host=localhost"
db.tables -p
=> OK

db.connect driver=pg database="dbname=nc_grass, host=localhost"
db.tables -p
=>Error

I don't know if this was intended. Please file a bug report.

Not intended. Please try trunk r64396 (update of db/drivers).

Markus M

Moritz

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

On 02/02/15 14:36, Markus Metz wrote:

On Mon, Feb 2, 2015 at 1:57 PM, Moritz Lennert
<mlennert@club.worldonline.be> wrote:

On 02/02/15 13:37, Paul Shapley wrote:

Hi Grass 7 users.

I am trying to connect some vector layers with thier respective
attribute tables in postgres/postgis. The tables all connected under
version 6.4.4 but not since upgrading to version 7RC1 (on winxp in this
instance) they do not. It looks like Grass cannot find the database
password but it is present in 'db.login'. Has anyone else had this
happen? Here are the outputs:-

Apparently there was a change in the db driver that has the effect of not
allowing whitespace between the different connection parameters.

GRASS64:

db.connect driver=pg database="dbname=nc_grass,host=localhost" db.tables -p
=> OK

db.connect driver=pg database="dbname=nc_grass, host=localhost"
db.tables -p
=> OK

trunk (7.1):

db.connect driver=pg database="dbname=nc_grass,host=localhost"
db.tables -p
=> OK

db.connect driver=pg database="dbname=nc_grass, host=localhost"
db.tables -p
=>Error

I don't know if this was intended. Please file a bug report.

Not intended. Please try trunk r64396 (update of db/drivers).

Works now. Thanks a lot !

Moritz