[GRASS5] Re: [GRASSLIST:987] Re: g.select.pg problem: list OK but refuse to select available database

Glynn Clements glynn.clements at virgin.net
Fri Aug 22 04:41:20 EDT 2003


Markus Neteler wrote:

> > Note that the g.select.pg program in 5.0.2 (and earlier) doesn't allow
> > you to "undefine" a host. Once you use "g.select.pg host=...", all
> > subsequent connections will be via TCP/IP. You can select a different
> > host, but you can't revert to Unix domain sockets.
> > 
> > To revert to using a Unix domain socket to connect to a local
> > postmaster process, you have to manually delete the PG_HOST entry from
> > the $GISRC file (typically ~/.grassrc5).
> > 
> > This is fixed in the CVS HEAD version, and should be fixed in 5.0.3.
> 
> Is this already fixed in 5.0.3?

Not yet.

> Where to look for that?

cvs diff -r 1.11 -r 1.12 src.garden/grass.postgresql/g.select.pg/main.c

--- src.garden/grass.postgresql/g.select.pg/main.c	24 Nov 2002 12:39:58 -0000	1.11
+++ src.garden/grass.postgresql/g.select.pg/main.c	28 May 2003 05:30:26 -0000	1.12
@@ -61,6 +61,8 @@
 
     if (pghost->answer)
 	G_setenv("PG_HOST", pghost->answer);
+    else
+	G_unsetenv("PG_HOST");
 
     if (list->answer) {
 	fprintf(stderr, _("The following databases are in the Unix catalogue:\n"));

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




More information about the grass-dev mailing list