Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 46c3e29

Browse files
committed
>>Also, what is the default connection mode of psql? It should probably be
>>equivalent to "-h localhost", shouldn't it? >> >> > >Now that is something I had not thought of. Seems we can assume a Win32 >psql can never use unix domain sockets, so defaulting that to localhost >is a good solution too. Andrew Dunstan
1 parent f23cce7 commit 46c3e29

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/bin/psql/startup.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2003, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/startup.c,v 1.86 2004/03/21 22:29:11 tgl Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/startup.c,v 1.87 2004/03/24 03:10:29 momjian Exp $
77
*/
88
#include "postgres_fe.h"
99

@@ -154,6 +154,11 @@ main(int argc, char *argv[])
154154
pset.getPassword = false;
155155
#endif
156156

157+
#ifndef HAVE_UNIX_SOCKETS
158+
/* default to localhost on platforms without unix sockets */
159+
options.host = "localhost";
160+
#endif
161+
157162
parse_psql_options(argc, argv, &options);
158163

159164
if (!pset.popt.topt.fieldSep)

0 commit comments

Comments
 (0)