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

Eric G. Miller egm2 at jps.net
Sat Jul 6 23:08:56 EDT 2002


On Sat, Jul 06, 2002 at 10:41:21PM -0400, Ben Logan wrote:
> On Sat, Jul 06, 2002 at 10:24:03PM -0300, Christoph Simon wrote:
> > On Sat, 6 Jul 2002 21:11:05 -0400
> > Ben Logan <ben at wblogan.net> 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...

-- 
Eric G. Miller <egm2 at jps.net>



More information about the grass-user mailing list