Index: src/interfaces/libpq/fe-connect.c
===================================================================
RCS file: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v
retrieving revision 1.329
diff -c -c -r1.329 fe-connect.c
*** src/interfaces/libpq/fe-connect.c	17 May 2006 21:50:54 -0000	1.329
--- src/interfaces/libpq/fe-connect.c	18 May 2006 16:21:36 -0000
***************
*** 3110,3128 ****
  	if (hostname == NULL)
  		hostname = DefaultHost;
  	else if (is_absolute_path(hostname))
! 	{
! 		char		canon_host[MAXPGPATH];
! 		char		canon_def_socket[MAXPGPATH];
! 
! 		StrNCpy(canon_host, hostname, MAXPGPATH);
! 		StrNCpy(canon_def_socket, DEFAULT_PGSOCKET_DIR, MAXPGPATH);
! 
! 		canonicalize_path(canon_host);
! 		canonicalize_path(canon_def_socket);
! 
! 		if (strcmp(canon_host, canon_def_socket) == 0)
  			hostname = DefaultHost;
- 	}
  	
  	if (port == NULL)
  		port = DEF_PGPORT_STR;
--- 3110,3122 ----
  	if (hostname == NULL)
  		hostname = DefaultHost;
  	else if (is_absolute_path(hostname))
! 		/*
! 		 *	We should probably use canonicalize_path(), but then
! 		 *	we have to bring path.c into libpq, and it doesn't
! 		 *	seem worth it.
! 		 */
! 		if (strcmp(hostname, DEFAULT_PGSOCKET_DIR) == 0)
  			hostname = DefaultHost;
  	
  	if (port == NULL)
  		port = DEF_PGPORT_STR;
