[GRASSLIST:4051] Re: Postgres and g.select.db problem.

Glynn Clements glynn.clements at virgin.net
Sun Jul 7 03:35:27 EDT 2002


Eric G. Miller wrote:

> > > > As you say, psql must use Unix sockets.
> > > 
> > > I didn't want to have said that. Using Unix sockets can be more
> > > secure, as they allow to disable TCP sockets and should be used if no
> > > access from other machines is needed. But if you do need network
> > > access, TCP sockets are required and can be used also with psql. Then,
> > > specially if this machine is accessible from the Internet, pg_hba.conf
> > > should be adjusted carefully.
> > 
> > Point well taken.  I have only allowed TCP connections from 127.0.0.1,
> > and also have a firewall setup.  I am curious though--is it possible
> > to make GRASS use Unix sockets?  If so, I could change pg_hba.conf
> > back like it was.
> 
> It's a function of libpq whether TCP or Unix sockets are used.  It's
> determined by whether a hostname and port are specified.  If both are
> NULL, libpq will attempt to use Unix sockets.  So, only specify the
> database name to g.select.pg...

Failing to specify a host= option causes any existing setting for
PG_HOST to be retained, rather than removing the setting. You can
remove the setting with

	g.gisenv set=PG_HOST=

g.select.pg should probably be changed.

-- 
Glynn Clements <glynn.clements at virgin.net>



More information about the grass-user mailing list