[GRASS-dev] PostGIS layer import

Markus Neteler neteler at osgeo.org
Tue May 23 03:54:35 PDT 2017

On Tue, May 23, 2017 at 11:34 AM, Moritz Lennert
<mlennert at club.worldonline.be> wrote:
> On 19/05/17 22:31, Markus Metz wrote:
>> On Thu, May 18, 2017 at 12:59 PM, Markus Neteler <neteler at osgeo.org
>>> On Wed, May 17, 2017 at 3:03 PM, Markus Metz
>>> > On Wed, May 17, 2017 at 9:31 AM, Moritz Lennert
>>> Just a side-note: I would be very happy to not store the password in
>>> the cmd line history. PG itself supports a password file
>>> (https://www.postgresql.org/docs/9.6/static/libpq-pgpass.html).
>>> Please keep any password hiding option(s) in mind when working on the
>>> design.
>> Apparently such a password file is recognized by the PostgreSQL client
>> library, therefore no special mechanism should be needed for OGR or
>> GRASS, but a hint in the manuals of db.login and v.in.ogr might be
>> helpful.
> Just as a feedback: I just tried v.in.ogr with
> v.in.ogr "PG:host=thehost dbname=thedb user=theuser"  layer=thetable
> out=mymap
> and a .pgpass file entry as such:
> thehost:5432:thedb:theuser:thepasswd
> and it works like a charm.

Likely also valid for v.out.ogr when writing to PG (?).

> Is login info really useful for other drivers than pg and mysql ? Maybe we
> should look into deprecating db.login and telling people to use the .pgpass
> / .mylogin.cnf files ?

I'd be quite in favor since db.login writes a central file (rather
than mapset specific files) only which prevents the user from
connecting to several databases.

> If we want to keep a tool such as db.login it should probably work with a
> password prompt that doesn't show the password on the command line.

strong +1.

Apparently it would be sufficient to add text/example snippets in the
manual pages about the .pgpass and  .mylogin.cnf files ?


More information about the grass-dev mailing list