[GRASS-user] Finding why postgres database cannot be opened

Markus Metz markus.metz.giswork at gmail.com
Wed Nov 7 13:26:13 PST 2018


On Wed, Nov 7, 2018 at 8:40 PM Rich Shepard <rshepard at appl-ecosys.com>
wrote:
>
> On Wed, 7 Nov 2018, Moritz Lennert wrote:
>
> > I think you need to slow down a bit and try to review your basic
> > understanding of things (maybe [1] could do with a bit more substance).
>
> Moritz,
>
>    I do need to step back a bit.
>
> > You are trying to connect to a database that is called
> > "/home/rshepard/data/grassdata/willamette_basin/willamette-river-hg",
not (as
> > it should be) "willamette-river-hg".
>
>    Yes, I see where I kept confusing path names for the sqlite and
postgres
> tables.
>
>    Almost all issues are now resolved, but I need to add a 'cat' column to
> the postgres stations table (it has more columns than does the sqlite
one),
> so I'll so this with psql and insert sequential numbers in that column
that
> follow the site_nbr columns. Looking at all tables, I think this is the
last
> hurdle to displaying the stations table.

I am afraid that manually adding a cat column and populating it with
sequential numbers will  not work: how do you assure that the cat numbers
and corresponding attribute values indeed correspond to the cat values of
the vector features? Chances are high that vector features get linked to
wrong attributes.

Considering all the modifications that you have done in the meantime I
suggest to start from scratch:

1. decide on the default database connection you want to use
2. set up the default database connection if not sqlite
3. test the database connection e.g. with db.tables
4. create vector maps

Markus M
>
>    Thanks very much.
>
> Regards,
>
> Rich
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20181107/b630ce7e/attachment.html>


More information about the grass-user mailing list