[GRASS-user] Migrating to new RDBMS [DONE]

Rich Shepard rshepard at appl-ecosys.com
Thu Nov 1 08:25:30 PDT 2018


On Tue, 30 Oct 2018, Rich Shepard wrote:

> Trying to run db.copy to add attribute tables to the database (except for
> one that is already present) using a script with commands like this:

Markus M./Moritz:

   All fixed now. There was an issue with the postgres upgrade from 9.x to
10.x (a long time ago) that did not appear until I tried connecting to a
database with grass. Took the rest of yesterday to fix broken symlinks and
this morning I upgraded from 10.3 to 10.5 (the upgrade to 11.0 can wait a
bit). Running 'db.test test1' in the latest 7.7.svn release required me to
add another host line in pg_hba.conf to allow access from all hosts on the
office network. Now everything's working:

> db.test test1
Using DB driver: pg
CREATE TABLE grass_test1 (i1 INTEGER, d1 DOUBLE PRECISION, c1 VARCHAR(20))
EXECUTE: OK
INSERT INTO grass_test1 VALUES ( 1, 123.456, 'abcd' )
EXECUTE: OK
INSERT INTO grass_test1 VALUES ( 2, null, 'xxx' )
EXECUTE: OK
SELECT * FROM grass_test1
EXECUTE: OK
RESULT: OK
SELECT c1 FROM grass_test1 WHERE d1 < 500 / 2 AND i1 <> 2  AND c1 LIKE '%bc%' 
EXECUTE: OK
RESULT: OK
INSERT INTO grass_test1 VALUES ( 3, 0.0, '_\''_' )
EXECUTE: OK
ALTER TABLE grass_test1 ADD COLUMN i2 INTEGER
EXECUTE: OK
UPDATE grass_test1 SET d1 = 18.6, i2 = 987  WHERE i1 = 2
EXECUTE: OK
SELECT * FROM grass_test1
EXECUTE: OK
2d1
< 3|0|_\\'_|
3a3
> 3|0|_\'_|
ERROR: RESULT: ******** ERROR ********
DROP TABLE grass_test1
EXECUTE: OK

   Had I not started to migrate my grass project databases to postgres I
would not have exposed the broken links (which did not stop psql from
working at the bash prompt for some reason).

Thank you both for your patient help,

Rich


More information about the grass-user mailing list